Re: Get data type aliases - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Get data type aliases
Date
Msg-id 20130612193109.GH5491@eldon.alvh.no-ip.org
Whole thread Raw
In response to Get data type aliases  (Rebecca Clarke <r.clarke83@gmail.com>)
Responses Re: Get data type aliases  (Rebecca Clarke <r.clarke83@gmail.com>)
List pgsql-general
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 by date:

Previous
From: Stephen Scheck
Date:
Subject: Pass-by-reference UDTs and volatility
Next
From: Tom Lane
Date:
Subject: Re: Pass-by-reference UDTs and volatility