PostgreSQL中的pg_relation_filepath()函数

pg_relation_filepath()类似于pg_relation_filenode(),但它返回关系的整个文件路径名(相对于数据库集群的数据目录PGDATA)。

postgres=# select pg_relation_filepath('t1');
 pg_relation_filepath 
----------------------
 base/13211/24654
(1 row)

postgres=# SELECT pg_relation_filepath(oid), relpages FROM pg_class WHERE relname = 't1';
 pg_relation_filepath | relpages 
----------------------+----------
 base/13211/24654     |        0
(1 row)

postgres=# 

  

原文地址:https://www.cnblogs.com/abclife/p/11338164.html