From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com> |
Cc: | Alexander Lakhin <exclusion(at)gmail(dot)com>, Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCH] Add additional extended protocol commands to psql: \parse and \bind |
Date: | 2024-09-19 07:30:11 |
Message-ID: | ZuvTAx8XGmk2qfYj@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Sep 18, 2024 at 06:08:54PM +0900, Michael Paquier wrote:
> On Wed, Sep 18, 2024 at 09:42:43AM +0200, Anthonin Bonnefoy wrote:
>> I've joined a patch to clean the psql extended state at the start of
>> every extended protocol backslash command, freeing the allocated
>> variables and resetting the send_mode. Another possible approach would
>> be to return an error when there's already an existing state instead
>> of overwriting it.
>
> I'll double-check all that tomorrow, but you have looks like it is
> going in the right direction.
And done down to v16, with one logic for HEAD and something simpler
for \bind in v16 and v17.
Issuing an error if there is a state does not sound like a good idea
at this stage because it would suddenly break scripts that expect
multiple commands of \bind to prioritize the last one. If that was
something only on HEAD, I would have considered that as a serious
option, but not with v16 in mind for \bind.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Hunaid Sohail | 2024-09-19 07:51:51 | Re: [PATCH] Add roman support for to_number function |
Previous Message | shveta malik | 2024-09-19 06:40:17 | Re: Add contrib/pg_logicalsnapinspect |