Re: changes sequences to unique

From: Rene Pijlman <reageer(dot)in(dot)de(dot)nieuwsgroep(at)onzin-adres(dot)nl>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: changes sequences to unique
Date: 2001-06-06 19:30:10
Message-ID: 8q0tht0rdvmmhgtcjb3da55p79hughfn3k@4ax.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

dave(at)greatgeek(dot)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(at)spamcop(dot)net>

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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Yu Y Zhou 2001-06-06 19:33:32 installation in windows
Previous Message Tom Lane 2001-06-06 18:57:38 Re: changes sequences to unique