BUG #17866: behavior does not match documentation
The Post Office <noreply@postgresql.org>
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: eugeny@zhuzhnev.com
Date: 2023-03-23T15:10:08Z
Lists: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 17866
Logged by: Евгений Жужнев
Email address: eugeny@zhuzhnev.com
PostgreSQL version: 15.2
Operating system: Oracle Linux 9
Description:
sudo -u postgres psql pgc
psql (15.2)
Type "help" for help.
pgc=# SELECT EXTRACT(EPOCH FROM INTERVAL '5 days 3 hours');
extract
---------------
442800.000000
(1 row)
--
But in documentation we can see:
SELECT EXTRACT(EPOCH FROM INTERVAL '5 days 3 hours');
Result: 442800
https://www.postgresql.org/docs/current/functions-datetime.html
Commits
-
Doc: adjust examples of EXTRACT() output to match current reality.
- fbbd7edca867 16.0 landed
- 707691ea620e 15.3 landed
- 07a9f4f73386 14.8 landed
-
Change return type of EXTRACT to numeric
- a2da77cdb466 14.0 cited