From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
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 15:42:24 |
Message-ID: | 29740.1007739744@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Marc G. Fournier" <scrappy(at)hub(dot)org> writes:
> v7.2b3 no longer has an OID on pg_attribute?
Yup.
> Is this intentional? :(
Yup.
> 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;
This would not work anyway in 7.2, since the primary key of
pg_description is now (objoid,classoid,objsubid) not just (objoid).
I'd recommend using col_description(a.attrelid, a.attnum) rather
than the explicit join against pg_description.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Lockhart | 2001-12-07 16:14:52 | Third call for platform testing |
Previous Message | Tom Lane | 2001-12-07 15:36:13 | Re: [SQL] how to change the type |