X-Original-To: pgsql-docs-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 4BC1FD1C85A for ; Mon, 4 Aug 2003 16:51:07 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 28268-05 for ; Mon, 4 Aug 2003 13:49:50 -0300 (ADT) Received: from davinci.ethosmedia.com (209-128-84-228.bayarea.net [209.128.84.228]) by svr1.postgresql.org (Postfix) with ESMTP id 272B7D1CA07 for ; Mon, 4 Aug 2003 13:50:56 -0300 (ADT) Received: from [63.195.55.98] (HELO spooky) by davinci.ethosmedia.com (CommuniGate Pro SMTP 4.0.2) with ESMTP id 3474353; Mon, 04 Aug 2003 09:51:17 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Josh Berkus Organization: Aglio Database Solutions To: "scott.marlowe" , "Chad N. Tindel" Subject: Re: Mysql -> Postgresql pitfalls Date: Mon, 4 Aug 2003 09:49:01 -0700 User-Agent: KMail/1.4.3 Cc: References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200308040949.01128.josh@agliodbs.com> X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/22 X-Sequence-Number: 1882 Chad, Scott: > > Yes. The documentation very clearly states using sequences instead of > > auto-increment, but it doesn't make it clear that inserting the id's into > > data by hand doesn't cause the sequence to be auto-matically incremented. > > It'd be nice of postgres had a way to trigger an update of the sequence > > value after every insert containing an id clumn. Um, how would this be a bennefit? If you're inserting rows 101-259, how does it benefit you to have the system automatically increment the sequence from 601-759? FWIW, in 7.5 we're likely to implement SQL3 IDENTITY columns ... basically just a SERIAL column where you don't have the option of inserting your own value, you have to take what it gives you. -- Josh Berkus Aglio Database Solutions San Francisco