Re: Identity and Sequence

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Identity and Sequence
Дата
Msg-id CAKFQuwarjmGVfHiSRr3yZ0JAVzBr+qXd+nYgY3N4OBJWHBUrdg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Identity and Sequence  (Michael Corey <michael.corey.ap@nielsen.com>)
Ответы Re: Identity and Sequence
Список pgsql-general
On Fri, Feb 16, 2024 at 10:24 AM Michael Corey <michael.corey.ap@nielsen.com> wrote:
By explicitly making a column an IDENTITY column it is going to make a sequence behind the scenes even if one with a similar name exists.  I tried and it created part_tab_part_id_seq1.  Is there no way to have it use the original part_tab_part_id_seq?

No, the fact that there is even a sequence is mostly an implementation detail you shouldn't be concerned with.
 
 How do I get the data and the sequence in sync?  


That would be why the alter table command has a bunch of keywords and values as part of it.  So you can modify the values to be what you need.

David J.

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

Предыдущее
От: Michael Corey
Дата:
Сообщение: Re: Identity and Sequence
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Identity and Sequence