mirror of
https://github.com/postgres/postgres.git
synced 2025-06-14 18:42:34 +03:00
Document that datetime year '0' is considered in a recent century, not
just '00'.
This commit is contained in:
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/utils/adt/datetime.c,v 1.200 2009/01/01 17:23:49 momjian Exp $
|
* $PostgreSQL: pgsql/src/backend/utils/adt/datetime.c,v 1.201 2009/03/17 18:35:26 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -2264,7 +2264,7 @@ ValidateDate(int fmask, bool is2digits, bool bc, struct pg_tm * tm)
|
|||||||
}
|
}
|
||||||
else if (is2digits)
|
else if (is2digits)
|
||||||
{
|
{
|
||||||
/* allow 2-digit input for 1970-2069 AD; 00 is allowed */
|
/* allow 2-digit input for 1970-2069 AD; '0' or '00' is allowed */
|
||||||
if (tm->tm_year < 0) /* just paranoia */
|
if (tm->tm_year < 0) /* just paranoia */
|
||||||
return DTERR_FIELD_OVERFLOW;
|
return DTERR_FIELD_OVERFLOW;
|
||||||
if (tm->tm_year < 70)
|
if (tm->tm_year < 70)
|
||||||
|
Reference in New Issue
Block a user