1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-25 12:03:53 +03:00

psql: Improve tab-completion for PREPARE.

This commit enhances tab-completion for PREPARE xx AS to also suggest
MERGE INTO, VALUES, WITH, and TABLE.

Author: Haruna Miwa <miwa@sraoss.co.jp>
Reviewed-by: Fujii Masao <masao.fujii@gmail.com>
Discussion: https://postgr.es/m/TY7P286MB5466B859BD6C5BE64E961878F1CEA@TY7P286MB5466.JPNP286.PROD.OUTLOOK.COM
This commit is contained in:
Fujii Masao
2025-11-23 23:03:53 +09:00
parent 7d9043aee8
commit 81966c5458

View File

@@ -4951,7 +4951,8 @@ match_previous_words(int pattern_id,
/* PREPARE xx AS */ /* PREPARE xx AS */
else if (Matches("PREPARE", MatchAny, "AS")) else if (Matches("PREPARE", MatchAny, "AS"))
COMPLETE_WITH("SELECT", "UPDATE", "INSERT INTO", "DELETE FROM"); COMPLETE_WITH("SELECT", "UPDATE", "INSERT INTO", "DELETE FROM",
"MERGE INTO", "VALUES", "WITH", "TABLE");
/* /*
* PREPARE TRANSACTION is missing on purpose. It's intended for transaction * PREPARE TRANSACTION is missing on purpose. It's intended for transaction