agora inbox for [email protected]  
help / color / mirror / Atom feed
From: Dagfinn Ilmari MannsÃ¥ker <[email protected]>
Subject: [PATCH v2 5/6] Remove guard against generic completion after ALTER DATABASE ... RESET
Date: Mon, 9 Jun 2025 20:45:30 +0100

Commit 9df8727c5067 added explicit handling for ALTER DATABASE
... RESET earlier in the code, so no need to guard against it here.
---
 src/bin/psql/tab-complete.in.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/bin/psql/tab-complete.in.c b/src/bin/psql/tab-complete.in.c
index 6210786017e..c3184239a17 100644
--- a/src/bin/psql/tab-complete.in.c
+++ b/src/bin/psql/tab-complete.in.c
@@ -4957,8 +4957,7 @@ match_previous_words(int pattern_id,
 /* SET, RESET, SHOW */
 	/* Complete with a variable name */
 	else if (TailMatches("SET|RESET") &&
-			 !TailMatches("UPDATE", MatchAny, "SET") &&
-			 !TailMatches("ALTER", "DATABASE", MatchAny, "RESET"))
+			 !TailMatches("UPDATE", MatchAny, "SET"))
 		COMPLETE_WITH_QUERY_VERBATIM_PLUS(Query_for_list_of_set_vars,
 										  "CONSTRAINTS",
 										  "TRANSACTION",
-- 
2.49.0


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=v2-0006-Improve-tab-completion-for-RESET.patch



view thread (3+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: [PATCH v2 5/6] Remove guard against generic completion after ALTER DATABASE ... RESET
  In-Reply-To: <no-message-id-40207@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox