Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection
Date
Msg-id 29156.1504809097@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection
List pgsql-hackers
Simon Riggs <simon@2ndquadrant.com> writes:
> I would like to relax the restriction to allow this specific use case...
>   SET work_mem = X; SET max_parallel_workers = 4; SELECT ...
> so we still have only one command (the last select), yet we have
> multiple GUC settings beforehand.

On what basis do you claim that's only one command?  It would return
multiple CommandCompletes, for starters, so that it breaks the protocol
just as effectively as any other loosening.

Moreover, I imagine the semantics you really want is that the SETs only
apply for the duration of the command.  This wouldn't provide that
result either.

Haas' idea of some kind of syntactic extension, like "LET guc1 = x,
guc2 = y FOR statement" seems more feasible to me.  I'm not necessarily
wedded to that particular syntax, but I think it has to look like
a single-statement construct of some kind.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] assorted code cleanup