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