select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

FUNCTIONS / SYSTEM ADMINISTRATION FUNCTIONS

pg_filenode_relation

Read PG 18 manual ↗

Returns a relation's OID given the tablespace OID and filenode it is stored under.

Signatures & examples

pg_filenode_relation ( tablespace oid, filenode oid ) → regclass
Returns a relation's OID given the tablespace OID and filenode it is stored under. This is essentially the inverse mapping of pg_relation_filepath. For a relation in the database's default tablespace, the tablespace can be specified as zero. Returns NULL if no relation in the current database is associated with the given values, or if dealing with a temporary relation.
Version history 2
  1. PG 12 → 13changed
  2. PG 9.3 → 9.4added

Definition snapshot: 2026-09-14T13:14:25.684213+00:00@99e6866c · English manual source