Re: BUG #18348: Inconsistency with EXTRACT([field] from INTERVAL);
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: Michael Bondarenko <work.michael.2956@gmail.com>, Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2024-02-16T12:44:01Z
Lists: pgsql-bugs, pgsql-hackers
On Sat, 17 Feb 2024 at 01:27, Michael Bondarenko <work.michael.2956@gmail.com> wrote: > > Adding another inconsistency I found in the docs to this thread (https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT): > > The docs say: "source must be a value expression of type timestamp, time, or interval. (Expressions of type date are cast to timestamp and can therefore be used as well.)" > > Which implies that the following two results must be the same: > > tpch=# select extract(microseconds from date '1924.01.01'); > ERROR: date units "microseconds" not supported > > tpch=# select extract(microseconds from (date '1924.01.01')::timestamp); > extract > --------- > 0 It looks like a2da77cdb should have updated the documentation for this. David
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix extraction of week and quarter fields from intervals.
- 6be39d77a70d 18.0 landed
-
Doc: improve explanation of type interval, especially extract().
- fcd210d496da 17.0 landed
- ebf52e9b7532 14.12 landed
- eb1d008a7a18 13.15 landed
- 6d03e8109250 15.7 landed
- 3ad319b8cad4 16.3 landed