deduce sequence name from table and column

Поиск
Список
Период
Сортировка
От Louis-David Mitterrand
Тема deduce sequence name from table and column
Дата
Msg-id 20051220150453.GA26818@apartia.fr
обсуждение исходный текст
Ответы Re: deduce sequence name from table and column  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi,

Is there a way (from DBI) to deduce a sequence name from the table and
column it is attached to?

For instance:

  Column    |  Type   |                                Modifiers
-------------+---------+--------------------------------------------------------------------------
 id_fonction | integer | not null default nextval(('"fonction_id_fonction_seq"'::text)::regclass)

I'd like to be able to programmatically find "fonction_id_fonction_seq"
so that I can then call nextval() on it.

Thanks,

--
Only half the people in the world are above average intelligence.

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

Предыдущее
От: Henrique Engelmann
Дата:
Сообщение: Could not read - Permission denied
Следующее
От: Tom Lane
Дата:
Сообщение: Re: deduce sequence name from table and column