Re: Missing docs on AT TIME ZONE precedence?

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Missing docs on AT TIME ZONE precedence?
Дата
Msg-id ZWNV1pjBepdBwJK7@momjian.us
обсуждение исходный текст
Ответ на Missing docs on AT TIME ZONE precedence?  (Shay Rojansky <roji@roji.org>)
Ответы Re: Missing docs on AT TIME ZONE precedence?  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Missing docs on AT TIME ZONE precedence?  (Shay Rojansky <roji@roji.org>)
Список pgsql-hackers
On Sun, Nov 26, 2023 at 11:13:39AM +0100, Shay Rojansky wrote:
> Greeting hackers,
> 
> In the operator precedence table[1] table, AT TIME ZONE isn't explicitly listed
> out; that means it's to be interpreted in the "any other operator category".
> 
> However, it seems that the precedence of AT TIME ZONE is actually higher than
> that of the addition operator:
> 
> -- Fails with "function pg_catalog.timezone(unknown, interval) does not exist
> SELECT now() + INTERVAL '14 days' AT TIME ZONE 'UTC';
> 
> -- Works:
> SELECT (now() + INTERVAL '14 days') AT TIME ZONE 'UTC';
> 
> Note that missing parentheses for this were discussed in the context
> of pg_catalog.pg_get_viewdef[2].
> 
> Is there a missing line in the operator precedence table in the docs?

I think the big question is whether AT TIME ZONE is significant enough
to list there because there are many other clauses we could potentially
add there.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Shay Rojansky
Дата:
Сообщение: Missing docs on AT TIME ZONE precedence?
Следующее
От: "Anton A. Melnikov"
Дата:
Сообщение: Should timezone be inherited from template database?