pg_relation_filepath()

A function for obtaining the filepath of a relation

pg_relation_filepath() is a system function for obtaining the filepath of a relation, relative to the data directory.

pg_relation_filepath() was added in PostgreSQL 9.0.

Change history

Examples

Basic usage example for pg_relation_filepath():

postgres=# SELECT pg_relation_filepath('foo');
 pg_relation_filepath 
----------------------
 base/13832/16499
(1 row)

See filenode for further examples.

Categories

Data directory, System function

See also

pg_relation_filenode(), pg_filenode_relation()