Re: OIDs missing in pg_attribute?
От | Stephan Szabo |
---|---|
Тема | Re: OIDs missing in pg_attribute? |
Дата | |
Msg-id | 20011206220734.S31656-100000@megazone23.bigpanda.com обсуждение исходный текст |
Ответ на | OIDs missing in pg_attribute? ("Marc G. Fournier" <scrappy@hub.org>) |
Список | 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;
В списке pgsql-hackers по дате отправления: