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 54306D1C9E0 for ; Mon, 4 Aug 2003 19:29:58 +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 39878-10 for ; Mon, 4 Aug 2003 16:28:42 -0300 (ADT) Received: from calma.pair.com (calma.pair.com [209.68.1.95]) by svr1.postgresql.org (Postfix) with SMTP id 454C9D1C995 for ; Mon, 4 Aug 2003 16:29:47 -0300 (ADT) Received: (qmail 49065 invoked by uid 3059); 4 Aug 2003 19:29:48 -0000 Date: Mon, 4 Aug 2003 15:29:48 -0400 From: "Chad N. Tindel" To: "scott.marlowe" Cc: "Chad N. Tindel" , Josh Berkus , pgsql-docs@postgresql.org Subject: Re: Mysql -> Postgresql pitfalls Message-ID: <20030804192948.GA48747@calma.pair.com> References: <20030804172617.GB36172@calma.pair.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/30 X-Sequence-Number: 1890 > > > 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. > > > > Interesting... how do you import data from a dump with such columsn? > > Easy, after you import the last row, you > > select setval('seqname',lastvalue); > > on the sequence. Like I said above, it's mostly just a different way of > doing things in Postgresql, and often those different ways are less > obvious, and quite often, being less obvious is actually safer even if > it is a littler harder to learn up front. But you just said that I can't actually include the id column in an insert query. So how would I import data from a dump and ensure that the id columns are what I expect them to be? Chad