PostgreSQL中如何查看一个表所对应的文件

[pgsql@localhost bin]$ ./psql -d postgres
psql (9.1.2)
Type "help" for help.

postgres=# \d
No relations found.
postgres=# create table tab001(id integer);
CREATE TABLE
postgres=# select pg_relation_filepath('tab001');
 pg_relation_filepath 
----------------------
 base/12699/139312
(1 row)

postgres=# drop table tab001;
DROP TABLE
postgres=# \q
[pgsql@localhost bin]$ 

上述 base/12699/139312 ,就是tab001所对应的文件名称

posted @ 2013-07-04 09:42  健哥的数据花园  阅读(1860)  评论(0编辑  收藏  举报