Re: Tab completion for AT TIME ZONE
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Jim Jones <jim.jones@uni-muenster.de>
Cc: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>, pgsql-hackers@postgresql.org
Date: 2023-10-12T06:49:51Z
Lists: 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
Commits
-
psql: Add completion support for AT [ LOCAL | TIME ZONE ]
- d16eb83aba2e 17.0 landed