From: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
---|---|
To: | Jorge Godoy <godoy(at)ieee(dot)org> |
Cc: | John R Pierce <pierce(at)hogranch(dot)com>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: psql missing feature: show permissions for functions |
Date: | 2004-09-21 01:11:06 |
Message-ID: | 20040921011106.GA7013@dcc.uchile.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
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"
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-09-21 06:29:25 | Re: psql missing feature: show permissions for functions] |
Previous Message | Tom Lane | 2004-09-21 00:36:16 | Re: Backend with closed connection at 99% CPU |