Re: [HACKERS] Disallowing multiple queries per PQexec() - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [HACKERS] Disallowing multiple queries per PQexec()
Date
Msg-id 20170614175605.pswm2yqzjry5u36d@alap3.anarazel.de
Whole thread Raw
In response to Re: [HACKERS] Disallowing multiple queries per PQexec()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] Disallowing multiple queries per PQexec()  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: [HACKERS] Disallowing multiple queries per PQexec()  ("Daniel Verite" <daniel@manitou-mail.org>)
List pgsql-hackers
On 2017-06-12 10:32:57 -0400, Tom Lane wrote:
> "Daniel Verite" <daniel@manitou-mail.org> writes:
> > PGC_POSTMASTER implies that it's an instance-wide setting.
> > Is is intentional? I can understand that it's more secure for this not to
> > be changeable in an existing session, but it's also much less usable if you
> > can't set it per-database and per-user.
> > Maybe it should be PGC_SUSET ?
> 
> Bearing in mind that I'm not really for this at all...

FWIW, I agree that this isn't something we should do.  For one the GUC
would really have to be GUC_REPORT, which'll cost everyone, and will
break things like pgbouncer.   I also don't think it's a good solution to
the problem at hand - there *are* cases where application
*intentionally* use PQexec() with multiple statements, namely when
aggregate latency is an issue. Since it's an application writer's choice
whether to use it, it seems to make not that much sense to have a
serverside guc - it can't really be sensible set.   If you want to do
something here, you should probably work on convincing ORM etc. writers
to use PQexecParams().

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] v10beta pg_catalog diagrams
Next
From: Piotr Stefaniak
Date:
Subject: Re: pgindent (was Re: [HACKERS] [COMMITTERS] pgsql: Preventivemaintenance in advance of pgindent run.)