Re: Tab completion for AT TIME ZONE

2023-10-13 Thread Michael Paquier
On Fri, Oct 13, 2023 at 08:01:08AM +0200, Vik Fearing wrote: > On 10/13/23 06:31, Michael Paquier wrote: >> but after also removing >> the completion for "ZONE" after typing "AT TIME" because AT would be >> completed by "TIME ZONE". > > Why? The user can tab at any point. IMO this leads to unnec

Re: Tab completion for AT TIME ZONE

2023-10-12 Thread Vik Fearing
On 10/13/23 06:31, Michael Paquier wrote: On Fri, Oct 13, 2023 at 03:07:25AM +0200, Vik Fearing wrote: The SQL committee already has another operator starting with AT which is AT LOCAL. The other patch was the reason why I looked at this one. Thank you for updating and committing this patc

Re: Tab completion for AT TIME ZONE

2023-10-12 Thread Michael Paquier
On Fri, Oct 13, 2023 at 03:07:25AM +0200, Vik Fearing wrote: > The SQL committee already has another operator starting with AT which is AT > LOCAL. The other patch was the reason why I looked at this one. At the end, I've made peace with Dagfinn's argument two messages ago, and applied the patch

Re: Tab completion for AT TIME ZONE

2023-10-12 Thread Vik Fearing
On 10/12/23 10:27, Dagfinn Ilmari Mannsåker wrote: Michael Paquier writes: 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". +/* ...

Re: Tab completion for AT TIME ZONE

2023-10-12 Thread Dagfinn Ilmari Mannsåker
Michael Paquier writes: > 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 (T

Re: Tab completion for AT TIME ZONE

2023-10-11 Thread Michael Paquier
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")) + C

Re: Tab completion for AT TIME ZONE

2023-04-14 Thread Jim Jones
On 14.04.23 11:29, Dagfinn Ilmari Mannsåker wrote: It doesn't tab complete the AT TIME ZONE operator itself, just the timezone name after it, so this sholud work: # SELECT now() AT TIME ZONE or # SELECT now() AT TIME ZONE am However, looking more closely at the grammar, the word A

Re: Tab completion for AT TIME ZONE

2023-04-14 Thread Dagfinn Ilmari Mannsåker
w() AT TIME ZONE or # SELECT now() AT TIME ZONE am However, looking more closely at the grammar, the word AT only occurs in AT TIME ZONE, so we could complete the operator itself as well. Updated patch attatched. > Best, Jim - ilmari >From 365844db04d27c5bcd1ed

Re: Tab completion for AT TIME ZONE

2023-04-14 Thread Jim Jones
Hi, Is this supposed to provide tab completion for the AT TIME ZONE operator like in this query? SELECT '2023-04-14 08:00:00' AT TIME ZONE 'Europe/Lisbon'; The patch applied cleanly but I'm afraid I cannot reproduce the intended behaviour: postgres=# SELECT '2023-04-14 08:00:00' AT postgr

Re: Tab completion for AT TIME ZONE

2023-04-12 Thread Dagfinn Ilmari Mannsåker
Dagfinn Ilmari Mannsåker writes: > Hi hackers, > > A while back we added support for completing time zone names after SET > TIMEZONE, but we failed to do the same for the AT TIME ZONE operator. > Here's a trivial patch for that. Added to the 2023-07 commitfest: https://commitfest.postgresql.org

Re: Tab completion for AT TIME ZONE

2023-03-29 Thread Pavel Stehule
st 29. 3. 2023 v 12:28 odesílatel Dagfinn Ilmari Mannsåker < ilm...@ilmari.org> napsal: > Hi hackers, > > A while back we added support for completing time zone names after SET > TIMEZONE, but we failed to do the same for the AT TIME ZONE operator. > Here's a trivial patch for that. > +1 Pavel

Tab completion for AT TIME ZONE

2023-03-29 Thread Dagfinn Ilmari Mannsåker
Hi hackers, A while back we added support for completing time zone names after SET TIMEZONE, but we failed to do the same for the AT TIME ZONE operator. Here's a trivial patch for that. - ilmari >From 57138e851552a99174d00a0e48ce55ca3170df75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dagfinn=20Ilm