[pgsql@localhost bin]$ ./psql -d postgrespsql (9.1.2)Type "help" for help.postgres=# \dNo relations found.postgres=# create table tab001(id integer);CREATE TABLEpostgres=# select pg_relation_filepath('tab001'); pg_relation_filepath ---------------------- base/12699/139312(1 row)postgres=# drop table tab001;DROP TABLEpostgres=# \q[pgsql@localhost bin]$
上述 base/12699/139312 ,就是tab001所对应的文件名称