pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: btnakamichin <btnakamichin@oss.nttdata.com>
To: pgsql-hackers@postgresql.org
Subject: Feature improvement of tab completion for DEALLOCATE
Date: Fri, 25 Sep 2020 13:45:29 +0900
Message-ID: <ec1a45b06edfce13706f2c765778d8c2@oss.nttdata.com> (raw)

Hello!

I’d like to improve the deallocate tab completion.

The deallocate tab completion can’t complement “ALL”. Therefore, this 
patch fixes the problem.

Regards,

Naoki Nakamichi

Attachments:

  [text/x-diff] fix_tab_complete_deallocate.patch (511B, ../ec1a45b06edfce13706f2c765778d8c2@oss.nttdata.com/2-fix_tab_complete_deallocate.patch)
  download | inline diff:
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index 9c6f5ecb6a..d877cc86f0 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -2911,7 +2911,7 @@ psql_completion(const char *text, int start, int end)
 
 /* DEALLOCATE */
 	else if (Matches("DEALLOCATE"))
-		COMPLETE_WITH_QUERY(Query_for_list_of_prepared_statements);
+		COMPLETE_WITH_QUERY(Query_for_list_of_prepared_statements " UNION SELECT 'ALL'");
 
 /* DECLARE */
 	else if (Matches("DECLARE", MatchAny))


view thread (4+ messages)  latest in thread

Message-ID: <ec1a45b06edfce13706f2c765778d8c2@oss.nttdata.com>
Permalink:  ../ec1a45b06edfce13706f2c765778d8c2@oss.nttdata.com/
Also on:    postgresql.org/message-id/ec1a45b06edfce13706f2c765778d8c2@oss.nttdata.com

 ·  · 

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: pgsql-hackers@postgresql.org
  Cc: btnakamichin@oss.nttdata.com
  Subject: Re: Feature improvement of tab completion for DEALLOCATE
  In-Reply-To: <ec1a45b06edfce13706f2c765778d8c2@oss.nttdata.com>

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

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