Re: OIDs missing in pg_attribute?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: OIDs missing in pg_attribute?
Дата
Msg-id 29740.1007739744@sss.pgh.pa.us
обсуждение исходный текст
Ответ на OIDs missing in pg_attribute?  ("Marc G. Fournier" <scrappy@hub.org>)
Ответы Re: OIDs missing in pg_attribute?  (Bruno Wolff III <bruno@[66.92.219.49]>)
Список pgsql-hackers
"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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [SQL] how to change the type
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Third call for platform testing