pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: btnakamichin <btnakamichin@oss.nttdata.com>
To: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Feature improvement of tab completion for DEALLOCATE
Date: Fri, 25 Sep 2020 15:18:20 +0900
Message-ID: <680a8129485eb754f31ad0ccc1f7151f@oss.nttdata.com> (raw)
In-Reply-To: <997a84af-c2e2-abe4-aca2-abdfb7383346@oss.nttdata.com>
References: <ec1a45b06edfce13706f2c765778d8c2@oss.nttdata.com>
	<997a84af-c2e2-abe4-aca2-abdfb7383346@oss.nttdata.com>

2020-09-25 14:30 に Fujii Masao さんは書きました:
> On 2020/09/25 13:45, btnakamichin wrote:
>> Hello!
>> 
>> I’d like to improve the deallocate tab completion.
>> 
>> The deallocate tab completion can’t complement “ALL”. Therefore, this 
>> patch fixes the problem.
> 
> Thanks for the patch! It looks basically good, but I think it's better
> to add newline just before UNION to avoid long line, as follows.
> 
> -               
> COMPLETE_WITH_QUERY(Query_for_list_of_prepared_statements);
> +               
> COMPLETE_WITH_QUERY(Query_for_list_of_prepared_statements
> +                                                       " UNION SELECT 
> 'ALL'");
> 
> Regards,

Thank you, I appreciate your comment.

I have attached pattch with newline.

Regards,

NaokiNskamichi

Attachments:

  [text/x-diff] fix_tab_complete_deallocate_v2.patch (557B, ../680a8129485eb754f31ad0ccc1f7151f@oss.nttdata.com/2-fix_tab_complete_deallocate_v2.patch)
  download | inline diff:
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index d877cc86f0..75f81d66dc 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -2911,7 +2911,8 @@ psql_completion(const char *text, int start, int end)
 
 /* DEALLOCATE */
 	else if (Matches("DEALLOCATE"))
-		COMPLETE_WITH_QUERY(Query_for_list_of_prepared_statements " UNION SELECT 'ALL'");
+		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: <680a8129485eb754f31ad0ccc1f7151f@oss.nttdata.com>
Permalink:  ../680a8129485eb754f31ad0ccc1f7151f@oss.nttdata.com/
Also on:    postgresql.org/message-id/680a8129485eb754f31ad0ccc1f7151f@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, masao.fujii@oss.nttdata.com
  Subject: Re: Feature improvement of tab completion for DEALLOCATE
  In-Reply-To: <680a8129485eb754f31ad0ccc1f7151f@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