Re: Tab completion for AT TIME ZONE

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
Cc: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Tab completion for AT TIME ZONE
Date: 2023-10-12 06:49:51
Message-ID: ZSeXD_iCAXusVD5k@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2023-10-12 07:05:32 Re: Problem, partition pruning for prepared statement with IS NULL clause.
Previous Message John Morris 2023-10-12 06:07:26 Re: Where can I find the doxyfile?