Re: Does psql use nested transactions?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Haroldo Stenger <haroldo(dot)stenger(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Does psql use nested transactions?
Date: 2004-08-17 18:42:53
Message-ID: 8476.1092768173@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Haroldo Stenger <haroldo(dot)stenger(at)gmail(dot)com> writes:
> On Wed, 11 Aug 2004 11:47:35 -0400, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-08-17 18:44:18 Re: Does psql use nested transactions?
Previous Message Haroldo Stenger 2004-08-17 18:33:01 Re: Does psql use nested transactions?