| From: | Thomas Kellerer <spam_eater(at)gmx(dot)net> |
|---|---|
| To: | pgsql-novice(at)postgresql(dot)org |
| Subject: | Re: recurse in a single query |
| Date: | 2010-10-06 19:42:12 |
| Message-ID: | i8ijel$9i0$1@dough.gmane.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
Jean-Yves F. Barbier, 06.10.2010 21:25:
> Hi list,
>
> I'd like to know how to recurse on some elements into a single query
>
> SELECT P.oid, P.proname, P.proowner, P.pronargs, P.proargtypes::int[],
> T.typname AS "PROCRETURN" FROM pg_proc P INNER JOIN pg_type T ON
> P.prorettype = T.oid WHERE pronamespace = 230741;
>
> oid | proname | proowner | pronargs | proargtypes | PROCRETURN
> --------+---------+----------+----------+-------------------+------------
> 230749 | whoami | 230738 | 0 | {} | oid
> 237125 | jyadd | 230738 | 2 | [0:1]={1700,1700} | numeric
>
> The goal is to get {numeric,numeric} instead of {1700,1700} still with one
> query (if possible?)
>
SELECT pg_get_function_arguments(p.oid)
FROM pg_proc p
Thomas
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Helgi Örn Helgason | 2010-10-06 19:43:29 | Re: Alternative to AS? |
| Previous Message | Chris Browne | 2010-10-06 19:31:22 | Re: Alternative to AS? |