X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 62BFD474E53 for ; Tue, 18 Feb 2003 05:01:33 -0500 (EST) Received: from web14204.mail.yahoo.com (web14204.mail.yahoo.com [216.136.172.146]) by postgresql.org (Postfix) with SMTP id CC6E0474E44 for ; Tue, 18 Feb 2003 05:01:32 -0500 (EST) Message-ID: <20030218100134.91784.qmail@web14204.mail.yahoo.com> Received: from [203.125.237.38] by web14204.mail.yahoo.com via HTTP; Tue, 18 Feb 2003 02:01:34 PST Date: Tue, 18 Feb 2003 02:01:34 -0800 (PST) From: Raymond Pau Subject: How to make sequence skip existing key in table? To: pgsql-sql@postgresql.org In-Reply-To: <3E51F36A.75F42D3@rodos.fzk.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/392 X-Sequence-Number: 11790 Hi List, 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? Regards, Raymond Pau __________________________________________________ Do you Yahoo!? Yahoo! Shopping - Send Flowers for Valentine's Day http://shopping.yahoo.com