X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id E61799FA2FA for ; Wed, 24 May 2006 08:27:50 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 61106-04 for ; Wed, 24 May 2006 08:27:36 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from r1.mycybernet.net (r1.mycybernet.net [209.5.206.8]) by postgresql.org (Postfix) with ESMTP id 5C1E19FA43B for ; Wed, 24 May 2006 08:27:23 -0300 (ADT) Received: from 227-54-222-209.mycybernet.net ([209.222.54.227]:37501 helo=phlogiston.dydns.org) by r1.mycybernet.net with esmtp (Exim 4.50 (FreeBSD)) id 1FirWL-000CKA-43 for pgsql-sql@postgresql.org; Wed, 24 May 2006 07:27:21 -0400 Received: by phlogiston.dydns.org (Postfix, from userid 1000) id 6F7DD3FAF; Wed, 24 May 2006 07:27:17 -0400 (EDT) Date: Wed, 24 May 2006 07:27:17 -0400 From: Andrew Sullivan To: pgsql-sql@postgresql.org Subject: Re: PLEASE help ME , HOW TO GENERATE PRIMARY Keys on the fly Message-ID: <20060524112717.GC31756@phlogiston.dyndns.org> References: <20060524103549.1E41C5AF071@svr4.postgresql.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060524103549.1E41C5AF071@svr4.postgresql.org> User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/183 X-Sequence-Number: 25214 On Wed, May 24, 2006 at 05:35:10PM +0700, andi wrote: > > But my primary key is not in correct order like What does this mean? Is the key being generated by a sequence (i.e. is the column DEFAULT nextval('some_sequence'))? If so, the primary key will be assigned in COMMIT order. Note that the sequence does not guarantee no gaps, however. A -- Andrew Sullivan | ajs@crankycanuck.ca The fact that technology doesn't work is no bar to success in the marketplace. --Philip Greenspun