X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 54A1547580B for ; Tue, 18 Feb 2003 12:08:21 -0500 (EST) Received: from davinci.ethosmedia.com (unknown [209.10.40.251]) by postgresql.org (Postfix) with ESMTP id AF585475458 for ; Tue, 18 Feb 2003 12:08:20 -0500 (EST) Received: from [63.195.55.98] (HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 2845398; Tue, 18 Feb 2003 09:08:26 -0800 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Organization: Aglio Database Solutions To: Raymond Pau , pgsql-sql@postgresql.org Subject: Re: How to make sequence skip existing key in table? Date: Tue, 18 Feb 2003 09:07:21 -0800 User-Agent: KMail/1.4.3 References: <20030218100134.91784.qmail@web14204.mail.yahoo.com> In-Reply-To: <20030218100134.91784.qmail@web14204.mail.yahoo.com> MIME-Version: 1.0 Message-Id: <200302180907.21014.josh@agliodbs.com> Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/405 X-Sequence-Number: 11803 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? --=20 Josh Berkus Aglio Database Solutions San Francisco