Re: changes sequences to unique - Mailing list pgsql-admin

From Rene Pijlman
Subject Re: changes sequences to unique
Date
Msg-id 8q0tht0rdvmmhgtcjb3da55p79hughfn3k@4ax.com
Whole thread Raw
In response to changes sequences to unique  (Dave Stokes <dave@greatgeek.com>)
List pgsql-admin
dave@greatgeek.com (Dave Stokes) schreef:
>I have a sequence that I 'thought' was providing unique numbers but is
>not. Is there someway to turn on unique-ness?

Sequences are documented on
http://www.postgresql.org/users-lounge/docs/7.1/reference/sql-createsequence.html

The numbers may not be unique if:
- there are already values in the column that conflict with numbers
(to be) generated by the sequence
- it was created with "cycle" and it cycles
- values are inserted into the column that have not been generated by
the sequence
- there is more than one sequence inserting values into the column
- there is a trigger that interferes
- ...

>Should I reload after adding unique to the sequence?

I'm not sure what you mean by that.

--
Vriendelijke groet,
René Pijlman <rpijlman@spamcop.net>

Wat wil jij leren?
http://www.leren.nl/

pgsql-admin by date:

Previous
From: "Jay Emerson"
Date:
Subject: Re: postmaster successfully started?
Next
From: "Brian Baquiran"
Date:
Subject: Re: Intentionally splitting data in a table across files.