From: | Mark Clark <mark(dot)clark(at)enlightedinc(dot)com> |
---|---|
To: | "pgsql-docs(at)postgresql(dot)org" <pgsql-docs(at)postgresql(dot)org> |
Subject: | FW: [webmaster] Possible error in documentation for EXTRACT |
Date: | 2016-04-06 17:05:40 |
Message-ID: | 624ADA55-2C14-43E7-9A42-A84C425A24DE@enlightedinc.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
TWIMC,
In the documentation for EXTRACT<http://www.postgresql.org/docs/9.5/interactive/functions-datetime.html#FUNCTIONS-DATETIME-EXTRACT>, the example for “century" is as follows:
SELECT EXTRACT(CENTURY FROM TIMESTAMP '2000-12-16 12:21:13');
Result: 20
SELECT EXTRACT(CENTURY FROM TIMESTAMP '2001-02-16 20:38:40');
Result: 21
I believe the result for the second SELECT is incorrect. I believe it should be:
SELECT EXTRACT(CENTURY FROM TIMESTAMP '2001-02-16 20:38:40');
Result: 20
Alternatively, you could change the example to:
SELECT EXTRACT(CENTURY FROM TIMESTAMP '2100-02-16 20:38:40');
Result: 21
If I have missed some point about how this should work, then please ignore this e-mail.
Thanks,
Mark Clark
mark(dot)clark(at)enlightedinc(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Reid Thompson | 2016-04-06 20:06:26 | Re: FW: [webmaster] Possible error in documentation for EXTRACT |
Previous Message | Andreas Seltenreich | 2016-03-23 17:04:43 | [PATCH] Clarify semantics of restore_command exit status |