Re: psql: Add command to use extended query protocol - Mailing list pgsql-hackers

From Daniel Verite
Subject Re: psql: Add command to use extended query protocol
Date
Msg-id 01243e67-ef11-4c3a-90e7-c8a203e827da@manitou-mail.org
Whole thread Raw
In response to Re: psql: Add command to use extended query protocol  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: psql: Add command to use extended query protocol
List pgsql-hackers
    David G. Johnston wrote:

> I would keep the \gp meta-command to force extended mode regardless
> of whether the query itself requires it.

+1

> A pset variable to control the default seems reasonable as well.
> The implication would be that if you set that pset variable there is
> no way to have individual commands use simple query mode directly.

+1 except that it would be a \set variable for consistency with the
other execution-controlling variables. \pset variables control only
the display.

BTW if we wanted to auto-detect that a query requires binding or the
extended query protocol, we need to keep in mind that for instance
"PREPARE stmt AS $1" must pass without binding, with both the simple
and the extended query protocol.


Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/
Twitter: @DanielVerite



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Perform streaming logical transactions by background workers and parallel apply
Next
From: Amul Sul
Date:
Subject: Re: Tables not getting vacuumed in postgres