Re: Does psql use nested transactions? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Does psql use nested transactions?
Date
Msg-id 8476.1092768173@sss.pgh.pa.us
Whole thread Raw
In response to Re: Does psql use nested transactions?  (Haroldo Stenger <haroldo.stenger@gmail.com>)
List 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 by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Does psql use nested transactions?
Next
From: Tom Lane
Date:
Subject: Re: Does psql use nested transactions?