Re: [BUGS] BUG #1118: Misleading Commit message

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [BUGS] BUG #1118: Misleading Commit message
Дата
Msg-id 200407102001.i6AK1k825277@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [BUGS] BUG #1118: Misleading Commit message  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [BUGS] BUG #1118: Misleading Commit message
Список 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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Nested Transactions, Abort All
Следующее
От: Jan Wieck
Дата:
Сообщение: Re: Recovery Features