Skip site navigation (1) Skip section navigation (2)

How to describe functions.

From: Mladen Gogala <mladen(dot)gogala(at)vmsinfo(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: How to describe functions.
Date: 2009-12-10 21:39:34
Message-ID: 1260481174.2477.16.camel@nycwxp2622 (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
I  would like to write a single query listing all of the function
types. I know that I can write a procedure but I would prefer a single 
query. The problem is that in pg_proc, the column proargtypes is of the 
type "oidvector", which is another name for an array oid[]. The types 
are, of course in pg_type table. The problem here is the array
what I would really like is something like this:

select p.proname,(for($i=0;$i<p.pronargs;$i++ { t.typename where 
t.oid=p.proargtypes[$i] }
from pg_proc p, pg_type t;

Of course, I am aware that this is a bad syntax but this pseudocode is 
the best way to describe what I want to achieve. The issue is the array 

Mladen Gogala 
Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251 

The Leader in Integrated Media
Intelligence Solutions


pgsql-novice by date

Next:From: Thomas KellererDate: 2009-12-10 22:03:12
Subject: Re: How to describe functions.
Previous:From: Jean-Yves F. BarbierDate: 2009-12-10 19:59:48
Subject: Re: one or 2 transactions?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group