Re: use of postgres reg* datatypes in user tables? - Mailing list pgsql-general

From Tom Lane
Subject Re: use of postgres reg* datatypes in user tables?
Date
Msg-id 1352494.1724071851@sss.pgh.pa.us
Whole thread Raw
In response to use of postgres reg* datatypes in user tables?  (plsqlvids01 plsqlvids01 <plsqlvids01@gmail.com>)
List pgsql-general
plsqlvids01 plsqlvids01 <plsqlvids01@gmail.com> writes:
> What is the use of postgres regclass datatype in user tables? When would
> one want to use them when regular data types are available? If any tables
> have these data types, since pg_upgrade would fail, what data types should
> those be converted to?

Indeed, storing reg* types in user tables isn't particularly
recommended because of the pg_upgrade problem.  However, casting
to a reg* type is plenty useful in queries on the system catalogs.
There is more info and examples in the manual:

https://www.postgresql.org/docs/current/datatype-oid.html

            regards, tom lane



pgsql-general by date:

Previous
From: David Rowley
Date:
Subject: Re: Insert query performance
Next
From: KK CHN
Date:
Subject: WAL replication and Archive command for pgbackrest on same server conf