Re: about serial

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Guillaume Houssay <ghoussay(at)noos(dot)fr>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: about serial
Date: 2003-11-14 17:17:17
Message-ID: 20031114171717.GA3482@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Nov 14, 2003 at 18:24:16 +0100,
Guillaume Houssay <ghoussay(at)noos(dot)fr> wrote:
> I am using the version 7.3.4
>
> In some tables, I have serial to manage a unique identifier.
>
> As an example I have a column calld id_data as a serial4.
>
> I have in my tables 30 rows with id_data from 1 to 30
>
> Then I delete rows with id 10 and 11.
> Then I vaccum the table.
> I create some new rows and the id_data starts with 10 then 11 and then 12. But the problem is that 12 already exists. So I have 2 rows with the same id_data.
>
> Sorry if my problem is simple but I thought that the serial will keep moving starting at 31 instead of 10.

That is what it should do.

It might be helpful if you show us exactly what you are doing.

In response to

  • about serial at 2003-11-14 17:24:16 from Guillaume Houssay

Browse pgsql-general by date

  From Date Subject
Next Message Guillaume Houssay 2003-11-14 17:24:16 about serial
Previous Message Thomas LeBlanc 2003-11-14 17:08:49 Re: Loggin SQL Statements from JBOSS/JDBC