From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | work(dot)michael(dot)2956(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org |
Subject: | Re: BUG #18348: Inconsistency with EXTRACT([field] from INTERVAL); |
Date: | 2024-02-16 13:02:20 |
Message-ID: | CAApHDvr_-05ce6FaLM0P=hJBdV=Ht3=sdk_Eq__7YOf+fs5x9g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
On Sat, 17 Feb 2024 at 01:27, PG Bug reporting form
<noreply(at)postgresql(dot)org> wrote:
> tpch=# select extract(week from interval '3 weeks');
> ERROR: interval units "week" not supported
>
> In the documentation it's mentioned that 'week' is an ISO 8601 week, so it
> makes sense why it's not applicable to INTERVAL, which is the same for
> isoyear. However, the field is named week and not isoweek, so I expect it to
> work like the `select extract(year from interval '3 years');` does.
> Moreover, the documentation does not mention that the field cannot be
> extracted from INTERVAL, like it does for isoyear:
> https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT
Maybe that table should specify which type(s) each of the items listed
is applicable to. Seems better than mentioning which types they're not
applicable to.
David
From | Date | Subject | |
---|---|---|---|
Next Message | PG Bug reporting form | 2024-02-16 13:18:42 | BUG #18349: ERROR: invalid DSA memory alloc request size 1811939328, CONTEXT: parallel worker |
Previous Message | David Rowley | 2024-02-16 12:44:01 | Re: BUG #18348: Inconsistency with EXTRACT([field] from INTERVAL); |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2024-02-16 13:18:08 | Re: table inheritance versus column compression and storage settings |
Previous Message | Peter Eisentraut | 2024-02-16 12:57:56 | Re: Replace current implementations in crypt() and gen_salt() to OpenSSL |