Updated on 2024-09-30 GMT+08:00

Database Object Position Functions

pg_relation_filenode(relation regclass)

Description: Specifies the ID of a filenode with the specified relationship.

Return type: OID

Description: pg_relation_filenode receives the OID or name of a table, index, sequence, or compressed table, and returns the filenode number allocated to it. The filenode is the basic component of the file name used by the relationship. For most tables, the result is the same as that of pg_class.relfilenode. For the specified system directory, relfilenode is 0 and this function must be used to obtain the correct value. If a relationship that is not stored is transmitted, such as a view, this function returns NULL.

pg_relation_filepath(relation regclass)

Description: Specifies the name of a file path with the specified relationship.

Return type: text

Description: pg_relation_filepath is similar to pg_relation_filenode, except that pg_relation_filepath returns the whole file path name for the relationship (relative to the data directory PGDATA of the database cluster).