X-Original-To: pgsql-hackers@postgresql.org Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id DDCF5475E91 for ; Fri, 21 Mar 2003 11:15:34 -0500 (EST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id h2LGFXO02304; Fri, 21 Mar 2003 11:15:33 -0500 (EST) From: Bruce Momjian Message-Id: <200303211615.h2LGFXO02304@candle.pha.pa.us> Subject: Re: Roadmap for FE/BE protocol redesign In-Reply-To: <13358.1048263075@sss.pgh.pa.us> To: Tom Lane Date: Fri, 21 Mar 2003 11:15:32 -0500 (EST) Cc: Dave Cramer , PostgreSQL Development X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200303/918 X-Sequence-Number: 37164 Sounds good. --------------------------------------------------------------------------- Tom Lane wrote: > Bruce Momjian writes: > > What I was wondering is if we could create a currval() call that takes > > no arguments, and returns the most recent sequence id assigned. > > Why? That's still an extra query that the client has to issue, and > currval in that form would be an amazingly fragile programming tool. > (What if some trigger causes an autoincrement on some other sequence > than the one you are thinking about?) > > I liked the INSERT ... RETURNING and UPDATE ... RETURNING syntax > extensions that Philip Warner (IIRC) proposed awhile back. Those would > get the job done much more flexibly than anything else that's been > suggested. That's why I think it's a language problem and not a > protocol problem. > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/docs/faqs/FAQ.html > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073