Re: pg_attribute table

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pg_attribute table
Дата
Msg-id 22263.1106870601@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pg_attribute table  (Afton & Ray Still <rastill@shaw.ca>)
Список pgsql-novice
Afton & Ray Still <rastill@shaw.ca> writes:
> I'm trying to use information from the pg_attribute table, especially the
> atttypid and atttypmod columns.
> Can I count on these numbers to remain unchanged or do I need to cast them
> somehow, or get at this information some other way?

Well, for the built-in types: we're not in the habit of changing them,
but we reserve the right to do so.  For user-defined types: a
dump/reload will almost certainly assign new type OIDs.  So it depends
what you want to do and what time horizon you have for "unchanged".

If you would prefer to work with a textual type name then see
format_type(), which seems sadly undocumented but you use it like
format_type(atttypid, atttypmod).

            regards, tom lane

В списке pgsql-novice по дате отправления:

Предыдущее
От: Afton & Ray Still
Дата:
Сообщение: pg_attribute table
Следующее
От: "Van Ingen, Lane"
Дата:
Сообщение: Can't Get Going in psql