Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f3f8499

Browse files
committed
Repair case-conversion error in to_date's handling of roman numerals.
From Manuel Sugawara, approved by Karel Zak.
1 parent 0a7a825 commit f3f8499

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/utils/adt/formatting.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* -----------------------------------------------------------------------
22
* formatting.c
33
*
4-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.46 2001/12/05 02:06:19 ishii Exp $
4+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.47 2001/12/10 15:34:05 tgl Exp $
55
*
66
*
77
* Portions Copyright (c) 1999-2000, PostgreSQL Global Development Group
@@ -1476,7 +1476,7 @@ seq_search(char *name, char **array, int type, int max, int *len)
14761476
return -1;
14771477

14781478
/* set first char */
1479-
if (type == ONE_UPPER || ALL_UPPER)
1479+
if (type == ONE_UPPER || type == ALL_UPPER)
14801480
*name = toupper((unsigned char) *name);
14811481
else if (type == ALL_LOWER)
14821482
*name = tolower((unsigned char) *name);
@@ -2521,7 +2521,7 @@ dch_date(int arg, char *inout, int suf, int flag, FormatNode *node, void *data)
25212521
}
25222522
else if (flag == FROM_CHAR)
25232523
{
2524-
tmfc->mm = 12 - seq_search(inout, rm_months_lower, ALL_UPPER, FULL_SIZ, &len);
2524+
tmfc->mm = 12 - seq_search(inout, rm_months_lower, ALL_LOWER, FULL_SIZ, &len);
25252525
CHECK_SEQ_SEARCH(len, "rm");
25262526
if (S_FM(suf))
25272527
return len - 1;

0 commit comments

Comments
 (0)