Re: date_part/extract parse curiosity

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: date_part/extract parse curiosity
Дата
Msg-id 3036877.1666275125@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: date_part/extract parse curiosity  (Japin Li <japinli@hotmail.com>)
Ответы Re: date_part/extract parse curiosity  (Japin Li <japinli@hotmail.com>)
Список pgsql-hackers
Japin Li <japinli@hotmail.com> writes:
> On Thu, 20 Oct 2022 at 20:45, Erik Rijkers <er@xs4all.nl> wrote:
>> I noticed that
>> select date_part('millennium', now()); --> 3
>> 
>> will execute also, unperturbed, in this form:
>> select date_part('millennium xxxxx', now()); --> 3

> Maybe we should document this.  I'd be inclined to change the code to
> match the certain valid field names.

I think changing this behavior has a significant chance of drawing
complaints and zero chance of making anyone happier.

The current state of affairs (including the lack of unnecessary
documentation detail) is likely quite intentional.

            regards, tom lane



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

Предыдущее
От: Japin Li
Дата:
Сообщение: Re: date_part/extract parse curiosity
Следующее
От: Justin Pryzby
Дата:
Сообщение: Re: ccache, MSVC, and meson