| From: | Haruna Miwa <miwa(at)sraoss(dot)co(dot)jp> |
|---|---|
| To: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
| Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Add MERGE and VALUES statements to tab completion for PREPARE |
| Date: | 2025-11-20 06:04:58 |
| Message-ID: | TY7P286MB546678A4C303B7F177B3EBE5F1D4A@TY7P286MB5466.JPNP286.PROD.OUTLOOK.COM |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> Should we suggest "MERGE INTO" instead of just "MERGE",
> since INTO always follows MERGE?
>
> Also, how about adding "TABLE" and "WITH" to the suggestions,
> similar to the tab-completion for "COPY ("?
> SELECT statement can be specified in the PREPARE command,
> and it can start with SELECT, TABLE, or WITH [1].
Agreed.
I have updated the patch.
Regards,
--
Haruna Miwa
________________________________
差出人: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
送信: 2025 年 11 月 10 日 (月曜日) 14:15
宛先: Haruna Miwa <miwa(at)sraoss(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org <pgsql-hackers(at)postgresql(dot)org>
件名: Re: Add MERGE and VALUES statements to tab completion for PREPARE
On Mon, Nov 10, 2025 at 9:41 AM Haruna Miwa <miwa(at)sraoss(dot)co(dot)jp> wrote:
>
> Hi,
>
> As described in the manual[1], PREPARE ... AS command supports MERGE and VALUES statements, but current psql's tab completion does not suggest them.
> I created a patch that enables MERGE and VALUES to appear as tab completion suggestions.
>
> What do you think?
+1
Should we suggest "MERGE INTO" instead of just "MERGE",
since INTO always follows MERGE?
Also, how about adding "TABLE" and "WITH" to the suggestions,
similar to the tab-completion for "COPY ("?
SELECT statement can be specified in the PREPARE command,
and it can start with SELECT, TABLE, or WITH [1].
Regards,
[1] https://www.postgresql.org/docs/devel/sql-select.html
Regards,
--
Fujii Masao
| Attachment | Content-Type | Size |
|---|---|---|
| v2-0001-Add-MERGE-VALUES-WITH-and-TABLE-to-PREPARE-tab-co.patch | application/octet-stream | 910 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Zhijie Hou (Fujitsu) | 2025-11-20 06:09:12 | RE: Parallel Apply |
| Previous Message | Chao Li | 2025-11-20 05:51:56 | Re: gen_guc_tables.pl: Validate required GUC fields before code generation |