Re: Roadmap for FE/BE protocol redesign

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Dave Cramer <dave(at)fastcrypt(dot)com>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Roadmap for FE/BE protocol redesign
Date: 2003-03-21 16:11:15
Message-ID: 13358.1048263075@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-interfaces

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-03-21 16:15:32 Re: Roadmap for FE/BE protocol redesign
Previous Message Dave Cramer 2003-03-21 16:06:14 Re: Roadmap for FE/BE protocol redesign

Browse pgsql-interfaces by date

  From Date Subject
Next Message Bruce Momjian 2003-03-21 16:15:32 Re: Roadmap for FE/BE protocol redesign
Previous Message Dave Cramer 2003-03-21 16:06:14 Re: Roadmap for FE/BE protocol redesign