From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | elein <elein(at)varlena(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [BUGS] BUG #1118: Misleading Commit message |
Date: | 2004-07-10 20:01:46 |
Message-ID: | 200407102001.i6AK1k825277@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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(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
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2004-07-10 20:09:45 | Re: Nested Transactions, Abort All |
Previous Message | Jan Wieck | 2004-07-10 20:01:13 | Re: Recovery Features |