Re: Feature discussion: Should syntax errors abort a transaction?

Поиск
Список
Период
Сортировка
От Rafal Pietrak
Тема Re: Feature discussion: Should syntax errors abort a transaction?
Дата
Msg-id 1340570278.14341.32.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: Feature discussion: Should syntax errors abort a transaction?  (Jasen Betts <jasen@xnet.co.nz>)
Ответы Re: Feature discussion: Should syntax errors abort a transaction?  (Chris Travers <chris.travers@gmail.com>)
Список pgsql-general
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


В списке pgsql-general по дате отправления:

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: configuring queries for concurrent updates
Следующее
От: Michael Nolan
Дата:
Сообщение: Re: Hot standby streaming replication doesn't work