Re: Tab completion for AT TIME ZONE - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Tab completion for AT TIME ZONE
Date
Msg-id ZSeXD_iCAXusVD5k@paquier.xyz
Whole thread Raw
In response to Re: Tab completion for AT TIME ZONE  (Jim Jones <jim.jones@uni-muenster.de>)
Responses Re: Tab completion for AT TIME ZONE
List pgsql-hackers
On Fri, Apr 14, 2023 at 12:05:25PM +0200, Jim Jones wrote:
> The patch applies cleanly and it does what it is proposing. - and it's IMHO
> a very nice addition.
>
> I've marked the CF entry as "Ready for Committer".

+/* ... AT TIME ZONE ... */
+    else if (TailMatches("AT"))
+        COMPLETE_WITH("TIME ZONE");
+    else if (TailMatches("AT", "TIME"))
+        COMPLETE_WITH("ZONE");
+    else if (TailMatches("AT", "TIME", "ZONE"))
+        COMPLETE_WITH_TIMEZONE_NAME();

This style will for the completion of timezone values even if "AT" is
the first word of a query.  Shouldn't this be more selective by making
sure that we are at least in the context of a SELECT query?
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: John Morris
Date:
Subject: Re: Where can I find the doxyfile?
Next
From: David Rowley
Date:
Subject: Re: Problem, partition pruning for prepared statement with IS NULL clause.