Re: Does psql use nested transactions?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Does psql use nested transactions?
Дата
Msg-id 8476.1092768173@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Does psql use nested transactions?  (Haroldo Stenger <haroldo.stenger@gmail.com>)
Список pgsql-hackers
Haroldo Stenger <haroldo.stenger@gmail.com> writes:
> On Wed, 11 Aug 2004 11:47:35 -0400, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> It might be reasonable to offer that behavior as an option, but I think
>> I'd only want it on for interactive input.

> How could the server tell interactive input from scripted intput
> without an explicit setting meant to do it?

The server wouldn't.  One of the implications of this requirement is
that we don't implement the feature on the server side, but in psql.
psql then checks isatty(fileno(stdin)) before allowing it.

> Other than performance issues, I don't see why this is more dangerous
> than any other settings.

Silently ignoring errors is almost always a really bad idea.  Doing it
underneath an application that isn't expecting it is always a bad idea.

Perhaps more to the point, what we are talking about here is an option
to change the behavior of transactions from what it formerly was,
without any change in the SQL commands being issued.  From a backwards-
compatibility standpoint this is monstrously dangerous.  If you have
forgotten the server-side-autocommit fiasco, I suggest you go and read
the archives for a bit ...
        regards, tom lane


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Does psql use nested transactions?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Does psql use nested transactions?