From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Dave Cramer <dave@fastcrypt.com>
Cc: PostgreSQL Development <pgsql-hackers@postgresql.org>
Subject: Re: Roadmap for FE/BE protocol redesign
Date: Fri, 21 Mar 2003 11:11:15 -0500
Message-ID: <13358.1048263075@sss.pgh.pa.us> (raw)
In-Reply-To: <200303211554.h2LFsIf29529@candle.pha.pa.us>
References: <200303211554.h2LFsIf29529@candle.pha.pa.us>
Bruce Momjian <pgman@candle.pha.pa.us> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, pgman@candle.pha.pa.us, dave@fastcrypt.com, pgsql-hackers@postgresql.org
Subject: Re: Roadmap for FE/BE protocol redesign
In-Reply-To: <13358.1048263075@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox