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

Re: how to parse an proargtypes array?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: b t <qtboyzz(at)yahoo(dot)com>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: how to parse an proargtypes array?
Date: 2005-03-04 15:16:46
Message-ID: 27425.1109949406@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-interfaces
b t <qtboyzz(at)yahoo(dot)com> writes:
> I'm trying to find out all the argument type that a user-defined function required, I used this query, select proargtypes from pg_proc where proname = 'add_movie'; but it gives me an oidvector array 1043 23 1043 1043 1043 1015 1015 1015 1182 1015, is there a query to parse this and give me a list of type.

Perhaps the regprocedure output converter will help you.  Forget
proargtypes, just cast the function's OID to regprocedure.

If you really want to deal with the individual function argument type
OIDs, regtype would help with converting those to useful text; or see
format_type().

			regards, tom lane

In response to

pgsql-interfaces by date

Next:From: Tom LaneDate: 2005-03-04 15:30:10
Subject: Re: Function for determining column witdhs in libpq ?
Previous:From: David.JacquesDate: 2005-03-04 13:26:33
Subject: Function for determining column witdhs in libpq ?

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