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: | Rod Taylor <pg(at)rbt(dot)ca>, Greg Stark <gsstark(at)mit(dot)edu>, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Transaction aborts on syntax error. |
Date: | 2004-02-13 04:35:48 |
Message-ID: | 200402130435.i1D4Zma27208@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:
> > Rod Taylor wrote:
> >> Can this be done entirely on the client side?
> >>
> >> Have psql silently wrap every statement going out with a BEGIN and a
> >> COMMIT or ROLLBACK depending on whether there was an error or not?
>
> > Yep, we could do it in the client like we do for autocommit.
>
> Yeah, after more thought I think we probably want to insist that this be
> driven off subtransaction BEGIN/COMMIT commands issued by the client.
> Yesterday I suggested allowing a SET variable to change the behavior,
> but I now realize that would be as bad a mistake as server-side
> autocommit was: changing the installation default for such a variable
> would break clients left and right.
>
> So, whatever "error handling mode" conveniences we wish to put in should
> be put in on the client side.
Added to TODO:
* Use nested transactions to prevent syntax errors from aborting
a transaction
--
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 | Marc G. Fournier | 2004-02-13 04:37:32 | Re: [HACKERS] PITR Dead horse? |
Previous Message | Tom Lane | 2004-02-13 04:35:03 | Re: [HACKERS] PITR Dead horse? |