Re: PostgreSQL roadmap for 8.2 and beyond.

From: "Kevin McArthur" <postgresql-list(at)stormtide(dot)ca>
To: "Dave Cramer" <pg(at)fastcrypt(dot)com>, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: "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 15:52:39
Message-ID: 004c01c5d332$ce2c9160$0701a8c0@kdesktop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I've not actually looked in the source but i presume that insert returning
would work internally similar to a select in an update_after or insert_after
trigger.
If so then it should not care that an entry is a sequence or otherwise, it
should care what the actual data in the table is. It must work on the actual
data to properly work with defaults that are a product of a function that is
not a serial. Eg a uniqueidentifier's newid() func.

I could be wrong. But insert returning without picking up column defaults
would be extremely useless. getAutoGeneratedKeys in jdbc seems like it would
be a very useful interface, so if this patch doesnt support implementing
this, someone should fix that. (I'd check/fix it myself, but i don't have
much of a clue when it comes to c programming)

Kevin McArthur
----- Original Message -----
From: "Dave Cramer" <pg(at)fastcrypt(dot)com>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: "Neil Conway" <neilc(at)samurai(dot)com>; "PostgreSQL-development"
<pgsql-hackers(at)postgresql(dot)org>
Sent: Monday, October 17, 2005 6:12 AM
Subject: Re: [HACKERS] PostgreSQL roadmap for 8.2 and beyond.

>I fail to see how this solves the problem of getting auto generated keys.
>
> 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
>
> if we had that then we could correctly implement getAutoGeneratedKeys for
> jdbc.
>
> Dave
> On 17-Oct-05, at 8:33 AM, Bruce Momjian wrote:
>
>> Neil Conway wrote:
>>
>>> On Sun, 2005-16-10 at 01:20 -0700, Kevin McArthur wrote:
>>>
>>>> Don't forget insert/update returning.
>>>>
>>>
>>> Omar Kilani has a patch for this:
>>>
>>> http://archives.postgresql.org/pgsql-patches/2005-07/msg00568.php
>>>
>>> I would like to see it get into 8.2
>>>
>>
>> Yes, this is in the 8.2 patches queue:
>>
>> http://momjian.postgresql.org/cgi-bin/pgpatches_hold
>>
>>
>> --
>> Bruce Momjian | http://candle.pha.pa.us
>> pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
>> + If your life is a hard drive, | 13 Roberts Road
>> + Christ can be your backup. | Newtown Square, Pennsylvania
>> 19073
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 4: Have you searched our list archives?
>>
>> http://archives.postgresql.org
>>
>>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faq
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2005-10-17 15:54:48 Re: PostgreSQL roadmap for 8.2 and beyond.
Previous Message Magnus Hagander 2005-10-17 15:46:28 Re: More problems with the win32 installer for 8.1 beta3