↑↓ select ↵ open ⌫ change scope Open full search

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

Functions / System Information Functions And Operators

Translates a textual relation name to its OID.

Reading PG 18current·documented in 14 of 27 versions, 9.4 to 20

Signatures & examples

to_regclass ( text ) → regclass
Translates a textual relation name to its OID. A similar result is obtained by casting the string to type regclass (see Section 8.19); however, this function will return NULL rather than throwing an error if the name is not found.
Version history 3
  1. 15 → 16 changed
  2. 12 → 13 changed
  3. 9.3 → 9.4 added

Definition snapshot: b7bd9cda · English manual source