Re: question about auto increment like - Mailing list pgsql-novice

From Josh Berkus
Subject Re: question about auto increment like
Date
Msg-id 200304031601.12430.josh@agliodbs.com
Whole thread Raw
In response to question about auto increment like  (Don Patou <pknoob@noos.fr>)
List 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 by date:

Previous
From: Manfred Koizar
Date:
Subject: Re: Upgraded from 7.2 to 7.3
Next
From: "Mel Jamero"
Date:
Subject: Re: ERROR: More than one tuple returned by a subselect used as an expression.