By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,834 Members | 2,234 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,834 IT Pros & Developers. It's quick & easy.

about serial

P: n/a
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.

GH
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Fri, Nov 14, 2003 at 18:24:16 +0100,
Guillaume Houssay <gh******@noos.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.

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.