pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedhow to parse an proargtypes array?
3+ messages / 2 participants
[nested] [flat]
* how to parse an proargtypes array?
@ 2005-03-04 07:34 b t <qtboyzz@yahoo.com>
0 siblings, 1 reply; 3+ messages in thread
From: b t @ 2005-03-04 07:34 UTC (permalink / raw)
To: pgsql-interfaces
Hi, first off all thank to the people that took the time to reply to my message,
Unfortunately I do have another question to ask:
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.
thanks
-brian
---------------------------------
Celebrate Yahoo!'s 10th Birthday!
Yahoo! Netrospective: 100 Moments of the Web
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: how to parse an proargtypes array?
@ 2005-03-04 15:16 Tom Lane <tgl@sss.pgh.pa.us>
parent: b t <qtboyzz@yahoo.com>
0 siblings, 0 replies; 3+ messages in thread
From: Tom Lane @ 2005-03-04 15:16 UTC (permalink / raw)
To: b t <qtboyzz@yahoo.com>; +Cc: pgsql-interfaces
b t <qtboyzz@yahoo.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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Fwd: Re: how to parse an proargtypes array?
@ 2005-03-04 18:12 b t <qtboyzz@yahoo.com>
0 siblings, 0 replies; 3+ messages in thread
From: b t @ 2005-03-04 18:12 UTC (permalink / raw)
To: pgsql-interfaces
Note: forwarded message attached.
---------------------------------
Celebrate Yahoo!'s 10th Birthday!
Yahoo! Netrospective: 100 Moments of the Web
Hi Tom, I'm still kink of confuse, how do I use the regprocedure output converter and how do I type cast in sql language.
many thanks
-brian
Tom Lane <tgl@sss.pgh.pa.us> wrote:
b t 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
---------------------------------
Celebrate Yahoo!'s 10th Birthday!
Yahoo! Netrospective: 100 Moments of the Web
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2005-03-04 18:12 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-03-04 07:34 how to parse an proargtypes array? b t <qtboyzz@yahoo.com>
2005-03-04 15:16 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-03-04 18:12 Fwd: Re: how to parse an proargtypes array? b t <qtboyzz@yahoo.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox