Re: V3 protocol vs INSERT/UPDATE RETURNING

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Jonah H(dot) Harris" <jonah(dot)harris(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: V3 protocol vs INSERT/UPDATE RETURNING
Date: 2006-08-11 17:09:21
Message-ID: 16229.1155316161@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Jonah H. Harris" <jonah(dot)harris(at)gmail(dot)com> writes:
> On 8/11/06, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> 4. Treat PORTAL_ONE_RETURNING like PORTAL_UTIL_SELECT rather than
>> like PORTAL_ONE_SELECT; that is, execute the query to completion
>> on first call and stash the results in a tuplestore until the
>> client fetches them.

> I agree that it's inefficient, but am trying to think of any other
> positive reasons for doing #4 instead. Can you think of any other
> advantages system-wide to using #4 instead of #3?

Not really. Locks and so forth held by the query would be held till
commit in any case, so I don't see much advantage in finishing the
query immediately.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sven Suursoho 2006-08-11 17:10:30 plpython improvements
Previous Message Csaba Nagy 2006-08-11 16:50:26 Re: V3 protocol vs INSERT/UPDATE RETURNING