"Marc G. Fournier" <scrappy@hub.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