Re: PostgreSQL roadmap for 8.2 and beyond.

From: Dave Cramer <pg(at)fastcrypt(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Martijn van Oosterhout <kleptog(at)svana(dot)org>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Neil Conway <neilc(at)samurai(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PostgreSQL roadmap for 8.2 and beyond.
Date: 2005-10-17 17:32:22
Message-ID: 06ACAA35-9274-445B-8612-1A0AC95187EA@fastcrypt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 17-Oct-05, at 12:43 PM, Tom Lane wrote:

> Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
>
>> On Mon, Oct 17, 2005 at 09:12:35AM -0400, Dave Cramer wrote:
>>
>>> AFAIKS, the protocol needs to be tweaked to return at a minimum the
>>> currval for the first serial in the row, but more correctly all of
>>> the modified currval's for an insert
>>>
>
>
>> In what sense? It seems to do exactly what you want. The example
>> in the
>> documentation is:
>>
>
>
>> INSERT INTO films (title) VALUES ('Yojimbo') RETURNING film_id;
>>
>
> What Dave wants is for INSERT to automagically return any
> autogenerated
> keys, *without* any explicit RETURNING clause.
>
Yes, this is the essence of what would be required.
> I don't think that's a reasonable request, however: it amounts to a
> request to break the protocol and impose possibly-useless overhead on
> everyone's inserts, in order to save the JDBC driver some work in
> analyzing table metadata.

The JDBC problem at hand is there is a method which allows one to
retrieve the
autogenerated keys from an insert. I can understand Tom's argument
here. It should
be possible for the driver to build a query from the meta data.

On the other hand given that all of the serial increments are stored
in the session is it possible to
get the results of the last insert on the session ? If we can avoid
the extra query so much
the better, but either way is better than what we have ?

Dave
>
> regards, tom lane
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that
> your
> message can get through to the mailing list cleanly
>
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-10-17 17:32:47 Re: libpq's pollution of application namespace
Previous Message Martijn van Oosterhout 2005-10-17 17:02:23 Re: libpq's pollution of application namespace