From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | snpe <snpe(at)snpe(dot)co(dot)yu> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: pg_proc and pg_type |
Date: | 2002-09-17 01:56:37 |
Message-ID: | 200209170156.g8H1ubK10647@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
snpe wrote:
> Hello,
> I have column proargtypes (oidvector) in pg_proc and oid in pg_type
> Can I join tables pg_proc and pg_type and get row for every argument of
> functions
oidvector is a fixed-width array. However, you can access individual
elements, at least in the 7.3 beta I use:
select proargtypes[0] from pg_proc;
proargtypes
-------------
23
23
In <7.3 the length is fixed at 16, while in >=7.3 the length is 32.
You can then join that to pg_type:
test=> select typname from pg_proc, pg_type
test-> where proargtypes[0] = pg_type.oid;
typname
-------------
int4
int4
int4
int4
Hope that helps.
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Martijn van Oosterhout | 2002-09-17 02:18:43 | Re: find overlapping address ranges |
Previous Message | Ligia Pimentel | 2002-09-17 01:08:50 | Re: Table with 90 columns |