Tom Lane wrote:
> This does not work as intended if the initial SET doesn't roll back
> upon transaction failure. Yeah, you can restructure it to
>
> SET enable_seqscan = false;
> BEGIN;
> some-queries-that-might-fail;
> END;
> SET enable_seqscan = true;
>
> but what was that argument about some apps/drivers finding it
> inconvenient to issue commands outside a transaction block?
Yes, and if you want to place the SET on a single statement in a
multi-statement transaction, doing SET outside the transaction will not
work either because it will apply to all statements in the transaction.
-- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026