Re: question about auto increment like

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: question about auto increment like
Дата
Msg-id 200304031601.12430.josh@agliodbs.com
обсуждение исходный текст
Ответ на question about auto increment like  (Don Patou <pknoob@noos.fr>)
Список pgsql-novice
Pat,

> say u have 3 entries, the first entry (let's call it A) value is "1" the
second(let's call it B) is "2" and the third(let's call it C) is "3".
> If I delete B, I would like C value to become "2" ie to take B value.
> hope u see what I'm sayin.

What do these numbers represent?   If we're talking about a key for the table,
that's such a bad idea I won't help you with it.   If we're talking about
something else (like an entry sequence number) there are a few ways to do it,
but an auto-increment number (e.g. SERIAL) isn't one of them.

--
-Josh Berkus
 Aglio Database Solutions
 San Francisco


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

Предыдущее
От: Manfred Koizar
Дата:
Сообщение: Re: Upgraded from 7.2 to 7.3
Следующее
От: "Mel Jamero"
Дата:
Сообщение: Re: ERROR: More than one tuple returned by a subselect used as an expression.