mirror of
https://github.com/postgres/postgres.git
synced 2025-06-17 17:02:08 +03:00
Check a bit more carefully for preceeding ISO field tags
when decoding date fields.
This commit is contained in:
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.83 2001/12/29 18:31:29 thomas Exp $
|
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.84 2001/12/29 18:40:58 thomas Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -959,6 +959,10 @@ DecodeDateTime(char **field, int *ftype, int nf,
|
|||||||
if (tzp == NULL)
|
if (tzp == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
if ((isdigit(*field[i]) || (ptype != 0))
|
||||||
|
{
|
||||||
|
char *cp;
|
||||||
|
|
||||||
if (ptype != 0)
|
if (ptype != 0)
|
||||||
{
|
{
|
||||||
/* Sanity check; should not fail this test */
|
/* Sanity check; should not fail this test */
|
||||||
@ -967,10 +971,6 @@ DecodeDateTime(char **field, int *ftype, int nf,
|
|||||||
ptype = 0;
|
ptype = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isdigit(*field[i]))
|
|
||||||
{
|
|
||||||
char *cp;
|
|
||||||
|
|
||||||
/* Starts with a digit but we already have a time field?
|
/* Starts with a digit but we already have a time field?
|
||||||
* Then we are in trouble with a date and time already...
|
* Then we are in trouble with a date and time already...
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user