From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | Steve Howe <howe(at)carcass(dot)dhs(dot)org> |
Cc: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Proposal: Solving the "Return proper effected tuple |
Date: | 2002-09-09 04:53:41 |
Message-ID: | 20020908214906.X9149-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, 8 Sep 2002, Steve Howe wrote:
> Here are the proposals for solutioning the "Return proper effected
> tuple count from complex commands [return]" issue as seen on TODO.
>
> Any comments ?... This is obviously open to voting and discussion.
As it seems we're voting, I think Tom's scheme is about as good
as we'll do for the current API. I actually think that a better API
is a good idea, but it's an API change and we're in beta, so not
for 7.3.
I'm not 100% sure which of the PQcmdTuples behaviors makes sense (actually
I'm pretty sure neither do, but since the general complaint is knowing
whether something happened or not, sum gets around the last statement
doing 0 rows and running into the same type of problem).
> Proposal #2 (author: Tom lane):
> ---------------------------------
>
> Tom Lane's proposal, as posted on
> http://candle.pha.pa.us/mhonarc/todo.detail/return/msg00012.html,
> consists basically on the following:
>
> PQcmdStatus() ==> Should always return the same command type original
> submitted by the client.
>
> PQcmdTuples() ==> If no INSTEAD rule, return same output as for
> original command, ignoring other commands in the
> rule.If there is INSTEAD rules, use result of last
> command in the rewritten series, use result of last
> command of same type as original command or sum up
> the results of all the rewritten commands.
>
> (I particularly prefer the sum).
>
> PQoidValue() ==> If the original command was not INSERT, return 0.
> otherwise, if one INSERT, return it's original
> PQoidValue(). If more then one INSERT command
> applied, use last or other possibilities (please
> refer to the thread for details).
>
> Please refer to the original post to refer to the original message. I
> would like to point out that it was the most consistent proposal
> pointed out until now on the previous discussions (Bruce M. agrees
> with this one).
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2002-09-09 05:05:49 | Script to compute random page cost |
Previous Message | Bruce Momjian | 2002-09-09 03:52:46 | Re: Proposal: Solving the "Return proper effected tuple count |