Re: BUG #18348: Inconsistency with EXTRACT([field] from INTERVAL);

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: jian he <jian.universality@gmail.com>
Cc: Francisco Olarte <folarte@peoplecall.com>, Michael Bondarenko <work.michael.2956@gmail.com>, pgsql-bugs@lists.postgresql.org, dgrowleyml@gmail.com
Date: 2024-02-19T17:22:33Z
Lists: pgsql-bugs, pgsql-hackers

Attachments

jian he <jian.universality@gmail.com> writes:
> 9.9.1. EXTRACT, date_part
> hour field description as
> `
> The hour field (0–23)
> `
> Do we need to update for the EXTRACT(INTERVAL) case?

Yeah, probably.  I did a bit more wordsmithing too.
Here's a rolled-up patch.

			regards, tom lane

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix extraction of week and quarter fields from intervals.

  2. Doc: improve explanation of type interval, especially extract().