[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所对应的文件名称