On Sat, 2012-06-23 at 12:18 +0000, Jasen Betts wrote:
> On 2012-06-19, Rafal Pietrak <rafal@zorro.isa-geek.com> wrote:
>
> > And we are talking about interractive psql breaking transaction because
> > of syntax error - almost always this is a one time typo. I'd prefere it
> > to be a bit more "sloopy", then deployed SQL application (e.g.
> > non-interactive session).
>
> possibly you could program keyboard macros to handle savepoints to
> have an easy way to recover from these errors, but if you're working on a
Yes, but again. In my own psql usage, it goes like this: "this is a
simple and easy SQL, most of it was cut/paste anyway .... what could
possibly go wrong .... ups". But it goes wrong in less then every 20th
or 100th time, less then once in a few months. So i don't realy feel
like pushing somebody into a development effort, that woud just slightly
enhance psql comfort of usage. I most certainly want even be cooking any
macros, as .... I would forget to use it when it could be of some help.
My comment on this thread was mearly to object, that a request to allow
maintaining transaction state despite syntax error is "obviusly wrong".
> busy database keeping a transaction open whislt you think about syntax
> is going to cost perfromance for the other users.
And this is a really good point - although I do know my schemas and I
can choose appropriate moment for long hand-opened transation, mistakes
happen (well, this whole thread is about mistakes :)
Anyway, I personaly feel that psql would be more comfortable if one
could request "explicit rollback despite errors" (like by "BEGIN
INTERACTIVE").
-R