Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb7a0af7

Browse files
author
Thomas G. Lockhart
committed
Check a bit more carefully for preceeding ISO field tags
when decoding date fields.
1 parentdd0279b commitb7a0af7

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

‎src/backend/utils/adt/datetime.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.83 2001/12/29 18:31:29 thomas Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.84 2001/12/29 18:40:58 thomas Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -959,18 +959,18 @@ DecodeDateTime(char **field, int *ftype, int nf,
959959
if (tzp==NULL)
960960
return-1;
961961

962-
if (ptype!=0)
963-
{
964-
/* Sanity check; should not fail this test */
965-
if (ptype!=DTK_TIME)
966-
return-1;
967-
ptype=0;
968-
}
969-
970-
if (isdigit(*field[i]))
962+
if ((isdigit(*field[i])|| (ptype!=0))
971963
{
972964
char*cp;
973965

966+
if (ptype!=0)
967+
{
968+
/* Sanity check; should not fail this test */
969+
if (ptype!=DTK_TIME)
970+
return-1;
971+
ptype=0;
972+
}
973+
974974
/* Starts with a digit but we already have a time field?
975975
* Then we are in trouble with a date and time already...
976976
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp