Re: Inserting preset values into a serial column

Поиск
Список
Период
Сортировка
От Tim Landscheidt
Тема Re: Inserting preset values into a serial column
Дата
Msg-id m37hkovkwh.fsf@passepartout.tim-landscheidt.de
обсуждение исходный текст
Ответ на Inserting preset values into a serial column  (Michael Rowan <mike.rowan@internode.on.net>)
Список pgsql-novice
Michael Rowan <mike.rowan@internode.on.net> wrote:

> PostgreSQL 8.4.4.1

> Can someone pls confirm that, provided I am doing it right, I can insert a row into a table where the primary key is
serialNOT NULL and a (unique) value is provided in the offered data?  I cannot see an answer to this specific point in
thedocs. 

Sure, just try it. You only need to make sure that after
your insertion the corresponding sequence will not collide
with your data, e. g., you will have to setval() the se-
quence to MAX(value) (+ 1?).

Tim

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

Предыдущее
От: Michael Rowan
Дата:
Сообщение: Inserting preset values into a serial column
Следующее
От: Frank Bax
Дата:
Сообщение: Re: SELECT counts