diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2009-07-06 19:11:59 +0000 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2009-07-06 19:11:59 +0000 |
commit | dba44a63b09bb4b3fbf5368364d8fa06f3c4250c (patch) | |
tree | 42b1c238f5e523f1b9d69f46a22d9af3c9458045 /src | |
parent | e19c960df5437a30dc569cbe33175d8862012794 (diff) | |
download | postgresql-dba44a63b09bb4b3fbf5368364d8fa06f3c4250c.tar.gz postgresql-dba44a63b09bb4b3fbf5368364d8fa06f3c4250c.zip |
Fix ancient bug in handling of to_char modifier 'TH', when used with HH.
In what seems like an oversight, we used to treat 'TH' the same as lowercase
'th', but only with HH/HH12.
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/utils/adt/formatting.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c index 5af4788d0f2..dc0cf5989eb 100644 --- a/src/backend/utils/adt/formatting.c +++ b/src/backend/utils/adt/formatting.c @@ -1,7 +1,7 @@ /* ----------------------------------------------------------------------- * formatting.c * - * $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.116.2.4 2009/03/12 00:53:41 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.116.2.5 2009/07/06 19:11:59 heikki Exp $ * * * Portions Copyright (c) 1999-2006, PostgreSQL Global Development Group @@ -1903,7 +1903,7 @@ dch_time(int arg, char *inout, int suf, bool is_to_char, bool is_interval, tm->tm_hour % (HOURS_PER_DAY / 2) == 0 ? 12 : tm->tm_hour % (HOURS_PER_DAY / 2)); if (S_THth(suf)) - str_numth(p_inout, inout, 0); + str_numth(p_inout, inout, S_TH_TYPE(suf)); return strlen(p_inout); } else |