Getting sequence name for a non-serial column

Поиск
Список
Период
Сортировка
От Együd Csaba
Тема Getting sequence name for a non-serial column
Дата
Msg-id fbnvhp$le0$1@news.hub.org
обсуждение исходный текст
Список pgsql-general
Hi,
I've read several solutions to get the sequence name for a field defined as serial by create/alter table, but when I
define a default expression (e.g. like next_val('foo_seq') ) for an integer column pg_depend will not contain
information to describe this relation.

Is there a backward compatible method (back to 7.3 or 7.4) to get the sequence name for these fields? I know
pg_get_serial_sequence which works correctly only for serial fields and on versions 8.0+. It's a convenient and easy
way, but I also need this information on v7.3 servers and for non-serial columns.

I also can retrieve column_default from information_schema.columns view, but it contains an expression not a sequence
name.

Any suggestions are appreciated.

Many thanks,

   -- E.Cs.


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

Предыдущее
От: Ow Mun Heng
Дата:
Сообщение: Column as arrays.. more efficient than columns?
Следующее
От: Ow Mun Heng
Дата:
Сообщение: Need suggestion on how best to update 3 million rows