public inbox for [email protected]  
help / color / mirror / Atom feed
From: Jim Jones <[email protected]>
To: Dagfinn Ilmari Mannsåker <[email protected]>
Cc: [email protected]
Subject: Re: Tab completion for AT TIME ZONE
Date: Fri, 14 Apr 2023 12:05:25 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>

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 <tab><tab>
>
> or
>
>      # SELECT now() AT TIME ZONE am<tab>
>
>
> 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

Got it.

In that case, everything seems to work just fine:

postgres=# SELECT now() AT <tab>

.. autocompletes TIME ZONE :

postgres=# SELECT now() AT TIME ZONE


postgres=# SELECT now() AT TIME ZONE <tab><tab>
Display all 598 possibilities? (y or n)


postgres=# SELECT now() AT TIME ZONE 'Europe/Is<tab><tab>
Europe/Isle_of_Man  Europe/Istanbul


also neglecting the opening single quotes ...

postgres=# SELECT now() AT TIME ZONE Europe/Is<tab>

... autocompletes it after <tab>:

postgres=# SELECT now() AT TIME ZONE 'Europe/Is


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".

Jim







view thread (5+ messages)

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: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: Tab completion for AT TIME ZONE
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox