From: | Doug McNaught <doug(at)wireboard(dot)com> |
---|---|
To: | "Marc G(dot) Fournier" <scrappy(at)hub(dot)org> |
Cc: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Hannu Krosing <hannu(at)tm(dot)ee>, Scott Marlowe <scott(dot)marlowe(at)ihs(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Vote totals for SET in aborted transaction |
Date: | 2002-04-29 17:14:43 |
Message-ID: | m3helus9z0.fsf@varsoon.wireboard.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Marc G. Fournier" <scrappy(at)hub(dot)org> writes:
> Just as a stupid question here ... but, why do we wrap single queries into
> a transaction anyway? IMHO, a transaction is meant to tell the backend to
> remember this sequence of events, so that if it fails, you can roll it
> back ... with a single INSERT/UPDATE/DELETE, why 'auto-wrapper' it with a
> BEGIN/END?
Well, a single query (from the user's perspective) may involve a
funciton call that itself executes one or more other queries. I think
you want these to be under transactional control.
Plus, it's my understanding that the whole MVCC implementation depends
on "everything is in a transaction."
-Doug
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-04-29 17:26:23 | #warning possibly dangerous? |
Previous Message | Tom Lane | 2002-04-29 17:09:52 | Re: Vote totals for SET in aborted transaction |