Re: Get data type aliases

Поиск
Список
Период
Сортировка
От Rebecca Clarke
Тема Re: Get data type aliases
Дата
Msg-id CAMChtdcOcsLMcpZAA6F26mm6hFcq2umHe2fxtdZDdfENSV9MEA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Get data type aliases  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-general
That's great, thank you! worked like a charm.


On Wed, Jun 12, 2013 at 8:31 PM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
Rebecca Clarke escribió:
> Hi all.
>
> I have a function that has an attribute with datatype of character varying.
> In the pg_type table the oid of the data type points to type varchar
>
> Is there somewhere that identifies the alias for each type?

Cast the type name to regtype.  That outputs the "official" name.

alvherre=# select 'int'::regtype;
 regtype
---------
 integer
(1 fila)


--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: Why hash join cost calculation need reduction
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Why hash join cost calculation need reduction