Re: How to make sequence skip existing key in table?

From: Josh Berkus <josh(at)agliodbs(dot)com>
To: Raymond Pau <rpau(at)yahoo(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: How to make sequence skip existing key in table?
Date: 2003-02-18 17:07:21
Message-ID: 200302180907.21014.josh@agliodbs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Raymond,

> I am using sequence to generate to a list of unique
> key id that will be used as the primary key for some
> tables.
>
> My question is when the sequence wraps over to the
> minimum value(1), how can I ensure that the next id is
> not in the tables?

Do you really expect more than 2.4 billion rows?

--
Josh Berkus
Aglio Database Solutions
San Francisco

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jan Wieck 2003-02-18 17:38:14 Re: Drop temporary table only if it exists
Previous Message Hans-Jürgen Schönig 2003-02-18 16:58:45 Re: Trigger that will execute external program