From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | "Marc G(dot) Fournier" <scrappy(at)hub(dot)org> |
Cc: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: OIDs missing in pg_attribute? |
Date: | 2001-12-07 06:19:20 |
Message-ID: | 20011206220734.S31656-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, 6 Dec 2001, Marc G. Fournier wrote:
> Well, just spend the past few days banging my head against a brick
> wall trying to figure out why OpenACS 4.x won't work with PgSQL v7.2b3,
> and just figured it out, or, at least, figured out part of it ...
>
> v7.2b3 no longer has an OID on pg_attribute?
I believe so. My guess would be that it cut down the OID usage per
table greatly.
> The following works great in v7.1.3, but fails in v7.b3:
>
> select upper(c.relname) as table_name,
> upper(a.attname) as column_name,
> d.description as comments
> from pg_class c,
> pg_attribute a
> left outer join pg_description d on (a.oid = d.objoid)
> where c.oid = a.attrelid
> and a.attnum > 0;
I think the test would now be d.objoid=c.oid and d.objsubid=a.attnum
So,
select upper(c.relname) as table_name,
upper(a.attname) as column_name,
d.description as comments
from (pg_class c join pg_attribute a on (c.oid=a.attrelid) left outer join
pg_description d on (d.objsubid=a.attnum and d.objoid=c.\
oid)) where a.attnum>0;
From | Date | Subject | |
---|---|---|---|
Next Message | Brent Verner | 2001-12-07 06:40:28 | Re: OIDs missing in pg_attribute? |
Previous Message | Brent Verner | 2001-12-07 06:09:35 | Re: text -> time cast problem |