postgres.git / summary / log / commit / refs

commit    81966c5458fb0a441c69b21f63d43f04cdb0d2d6
Author:   Fujii Masao <fujii@postgresql.org>
Date:     Sun Nov 23 14:03:53 2025 +0000

    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


src/bin/psql/tab-complete.in.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/psql/tab-complete.in.c b/src/bin/psql/tab-complete.in.c index 51806597037..20d7a65c614 100644 --- a/src/bin/psql/tab-complete.in.c +++ b/src/bin/psql/tab-complete.in.c @@ -4951,7 +4951,8 @@ match_previous_words(int pattern_id, /* PREPARE xx 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 [parent: 7d9043aee803]