Re: date_part/extract parse curiosity

From: Japin Li <japinli(at)hotmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Erik Rijkers <er(at)xs4all(dot)nl>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: date_part/extract parse curiosity
Date: 2022-10-20 14:43:54
Message-ID: MEYP282MB16694BD9DFB991ED1CB64C17B62A9@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Thu, 20 Oct 2022 at 22:12, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Japin Li <japinli(at)hotmail(dot)com> writes:
>> On Thu, 20 Oct 2022 at 20:45, Erik Rijkers <er(at)xs4all(dot)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.
>

Maybe.

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

I'm curious about why not document this?

--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2022-10-20 15:11:17 cross-platform pg_basebackup
Previous Message Justin Pryzby 2022-10-20 14:17:54 Re: ccache, MSVC, and meson