Re: How to list domains

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to list domains
Дата
Msg-id 6843.1081388293@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: How to list domains  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-general
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> They are SQL-standard names for our int4, float8 types.  They map
> internally to those types.  I don't know a way to list separately.

You can use format_type() to get the canonical per-spec form.  For instance

regression=# select typname, format_type(oid,-1) from pg_type where oid in (1043,23);
 typname |    format_type
---------+-------------------
 varchar | character varying
 int4    | integer
(2 rows)

I don't know of any way to get a listing of secondary aliases that the
parser will recognize (such as "int" for int4).  They're hardwired into
the grammar rather than being table entries anywhere.  Fortunately,
there are not all that many beyond the typname and the format_type forms.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: ERROR: invalid memory alloc request size 0
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Cursors and Transactions, why?