Re: serial column

Поиск
Список
Период
Сортировка
От Ragnar
Тема Re: serial column
Дата
Msg-id 1159133058.8040.83.camel@localhost.localdomain
обсуждение исходный текст
Ответ на serial column  (Bob Pawley <rjpawley@shaw.ca>)
Список pgsql-general
On sun, 2006-09-24 at 13:50 -0700, Bob Pawley wrote:
> I need to develop a serial column that always starts at 1 and is
> sequential even after deletes.

what exactly do you mean?

say you have rows where your
columns has values 1,2,3 and 4.

you now delete the row where
the value is 2.

what do you want to happen?

a) the rows with values 3 and 4
are changed tocontain 2 and 3 ?

b) the next 2 values to be inserted
to be 2 and then 5 ?

c) something else ?


gnari




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

Предыдущее
От: Bob Pawley
Дата:
Сообщение: Re: serial column
Следующее
От: Bob Pawley
Дата:
Сообщение: Re: serial column