Re: [PATCH] Add additional extended protocol commands to psql: \parse and \bindx

From: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
To: Anthonin Bonnefoy <anthonin(dot)bonnefoy(at)datadoghq(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Add additional extended protocol commands to psql: \parse and \bindx
Date: 2024-01-16 12:51:59
Message-ID: CAGECzQRZ07N7fZ6OYua28RQ2-BzZYDdpU7gbBWtsy4By_vykQw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

One more usability thing. I think \parse and \close should not require
a \g to send the message. You can do that by returning PSQL_CMD_SEND
instead of PSQL_CMD_SKIP_LIN.
I feel like the main point of requiring \g for \bind and \bindx is so
you can also use \gset or \gexec. But since \parse and \close don't
return any rows that argument does not apply to them.

And regarding the docs. I think the examples for \bindx and \close
should use \parse instead of PREPARE. ISTM that people will likely
want to use the extended query protocol for preparing and executing,
not a mix of them. I know that it's possible to do that, but I think
the examples should cover the most common use case.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Maiquel Grassi 2024-01-16 12:54:16 New Window Function: ROW_NUMBER_DESC() OVER() ?
Previous Message Mats Kindahl 2024-01-16 12:16:27 Re: Add test module for Table Access Method