On Mon, Sep 20, 2004 at 07:35:58PM -0300, Jorge Godoy wrote:
> testbase=# SELECT proacl, proargtypes FROM pg_proc WHERE proname='to_ascii';
> proacl | proargtypes
> ---------------+-------------
> {=X/postgres} | 25
> {=X/postgres} | 25 19
> {=X/postgres} | 25 23
> (3 rows)
>
> testbase=#
>
> Where can I find this '25', '19', '23', etc. name? :-)
Those are OIDs from the pg_type catalog. The format_type(oid, integer)
function can give you the actual name, as in
alvherre=# SELECT proacl, proargtypes, format_type(proargtypes[0], 0),
format_type(proargtypes[1], 0) FROM pg_proc WHERE proname='to_ascii';
proacl | proargtypes | format_type | format_type
---------------+-------------+-------------+-------------
{=X/alvherre} | 25 | text | -
{=X/alvherre} | 25 19 | text | name
{=X/alvherre} | 25 23 | text | integer
(3 filas)
The second argument is the type's typmod (the 25 in varchar(25), for
instance).
--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"The ability to monopolize a planet is insignificant
next to the power of the source"