Re: Add regression tests for autocommit-off mode for psql and fix some omissions - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: Add regression tests for autocommit-off mode for psql and fix some omissions
Date
Msg-id 54332897.6010900@BlueTreble.com
Whole thread Raw
In response to Re: Add regression tests for autocommit-off mode for psql and fix some omissions  (Feike Steenbergen <feikesteenbergen@gmail.com>)
Responses Re: Add regression tests for autocommit-off mode for psql and fix some omissions
List pgsql-hackers
On 10/6/14, 9:59 AM, Feike Steenbergen wrote:
> It would test that when setting AUTOCOMMIT to off that you will not run into:
>
> ERROR: [...] cannot run inside a transaction block
>
> when issuing one of these PreventTransactionChain commands. In
> src/bin/psql/common.c

Yes, but what happens when a new non-transaction command is added? If we forget to exclude it in psql, we'll certainly
alsoforget to add it to the unit test.
 

The options I see...

1) If there's a definitive way to tell from backend source code what commands disallow transactions then we can just
usethat information to generate the list of commands psql shouldn't do that with.
 

2) Always run the regression test with auto-commit turned off.

3) Run the regression in both modes (presumably only on the build farm due to how long it would take).
-- 
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com



pgsql-hackers by date:

Previous
From: Ali Akbar
Date:
Subject: Re: Add generate_series(numeric, numeric)
Next
From: Michael Paquier
Date:
Subject: Re: Commitfest: patches Ready for Committer