↑↓ 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

Returns the OID of the base type of a domain identified by its type OID.

Reading PG 18current·documented in 4 of 27 versions, 17 to 20

Signatures & examples

pg_basetype ( regtype ) → regtype
Returns the OID of the base type of a domain identified by its type OID. If the argument is the OID of a non-domain type, returns the argument as-is. Returns NULL if the argument is not a valid type OID. If there's a chain of domain dependencies, it will recurse until finding the base type.
pg_basetype('mytext'::regtype) → text
Version history 1
  1. 16 → 17 added

Definition snapshot: b7bd9cda · English manual source