Re: nextval, sequences and sequencenames

Поиск
Список
Период
Сортировка
От Gordan Bobic
Тема Re: nextval, sequences and sequencenames
Дата
Msg-id Pine.LNX.4.33.0108150913120.13628-100000@sentinel.bobich.net
обсуждение исходный текст
Ответ на nextval, sequences and sequencenames  (Wieger Uffink <wieger@usmedia.nl>)
Список pgsql-general
On Tue, 14 Aug 2001, Wieger Uffink wrote:

> My question:
> is there anyway of retreiving the sequence_name corresponding to the
> respective column,
> knowing just the tablename and columnname?
>
> The reason I need to do this, is because the application I write
> dynamicly creates new tables, and I have no way of knowing the sequence
> name before hand.
>

Try "tablename_fieldname_seq". That is the default sequence name for a
"serial" field.

Cheers.

Gordan


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

Предыдущее
От: Walter
Дата:
Сообщение: Newbie: Solution?
Следующее
От: Einar Karttunen
Дата:
Сообщение: Re: libpq ::PQstatus()