Re: [BUGS] BUG #1118: Misleading Commit message - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [BUGS] BUG #1118: Misleading Commit message
Date
Msg-id 200407102001.i6AK1k825277@candle.pha.pa.us
Whole thread Raw
In response to Re: [BUGS] BUG #1118: Misleading Commit message  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [BUGS] BUG #1118: Misleading Commit message  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Tom Lane wrote:
> >> MOVE, FETCH, EXECUTE ...
> 
> > Ah, yes, I remember we changed EXECUTE recently to return the tag of
> > what we executed.  How do we modify MOVE/FETCH tags?  I can't remember.
> 
> I was just looking to see what cases ProcessUtility allowed to change
> the tag.  I think that what the code does is just to append the row
> count, which you could argue isn't "changing the tag".  But really,
> is returning "UPDATE 0" vs "UPDATE 1" any different conceptually from
> what we are talking about here?  It's still using the tag to pass back
> info about what the command actually did.

Yes, the count is what I remember changing, and as I remember the goal
was to have us return MOVE 0 if you do MOVE 1 at the end of a cursor. 
We already return counts for INSERT/UPDATE/DELETE, but the racial issue
with MOVE was that the count returned might not match the count
supplied.

Therefore, I don't see MOVE/FETCH as the same issue as ROLLBACK. 
EXECUTE is closer, and I think new for 7.5, but the interesting part
there is that you should always get back something different from
EXECUTE, while with COMMIT it would change only when you have an aborted
transaction.

As I remember, the big issue was how often applications are looking and
comparing these tags to take actions.  I think we should return ROLLBACK
on COMMIT failure and we can see if we get any problem reports during
beta.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Nested Transactions, Abort All
Next
From: Jan Wieck
Date:
Subject: Re: Recovery Features