Re: use of postgres reg* datatypes in user tables?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: use of postgres reg* datatypes in user tables?
Дата
Msg-id 1352494.1724071851@sss.pgh.pa.us
обсуждение исходный текст
Ответ на use of postgres reg* datatypes in user tables?  (plsqlvids01 plsqlvids01 <plsqlvids01@gmail.com>)
Список 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 по дате отправления: