| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | plsqlvids01 plsqlvids01 <plsqlvids01(at)gmail(dot)com> |
| Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: use of postgres reg* datatypes in user tables? |
| Date: | 2024-08-19 12:50:51 |
| Message-ID: | 1352494.1724071851@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
plsqlvids01 plsqlvids01 <plsqlvids01(at)gmail(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | KK CHN | 2024-08-19 13:10:05 | WAL replication and Archive command for pgbackrest on same server conf |
| Previous Message | David Rowley | 2024-08-19 11:03:32 | Re: Insert query performance |