Re: Question on datatypes returned for "select oid, typname from pg_type"

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Question on datatypes returned for "select oid, typname from pg_type"
Дата
Msg-id 4836.1331324119@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Question on datatypes returned for "select oid, typname from pg_type"  (Alexander Reichstadt <lxr@mac.com>)
Ответы Re: Question on datatypes returned for "select oid, typname from pg_type"  (Gavin Flower <GavinFlower@archidevsys.co.nz>)
Список pgsql-general
Alexander Reichstadt <lxr@mac.com> writes:
> to find out what datatypes exist. When checking on a certain field, it
> returned 17 as a type, thus being a bytea. That's actually the
> question now, because, is it always that bytea gets oid 17 or are
> these assignments of type name and oid dependent on the database
> installation, version of pg or whatever else I might be missing?

The built-in data types have hand-assigned OIDs, as depicted in
src/include/catalog/pg_type.h.  While those aren't quite
guaranteed-frozen, we've never changed one that I can recall, and are
not very likely to in the future.  However, any type that's not built-in
has an OID that will vary across databases.  As a rule of thumb,
you could assume that any OID under 10000 is hand-assigned and won't
change.

            regards, tom lane

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

Предыдущее
От: "Randy Ficker"
Дата:
Сообщение: Re: 9.1 causing "out of shared memory" error and higher serialization conflicts
Следующее
От: "Francisco Figueiredo Jr."
Дата:
Сообщение: Re: 9.1 causing "out of shared memory" error and higher serialization conflicts