git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a9eb539)
Fix to_date()/to_timestamp() 'D' field for day of week, was off by one.
2007年2月14日 05:10:55 +0000 (05:10 +0000)
2007年2月14日 05:10:55 +0000 (05:10 +0000)
Converting from char using 'D' doesn't make lots of sense, of course.

Report from Brendan Jurd.


diff --git a/src/backend/utils/adt/formatting.c b/src/backend/utils/adt/formatting.c
index 74e2db6082d7e9543338650576505a469ec8beea..80de2f20e4c1770b5bdf4f83e98b060567ab9015 100644 (file)
--- 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.123 2007年02月13日 02:00:55 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.124 2007年02月14日 05:10:55 momjian Exp $
*
*
* Portions Copyright (c) 1999-2007, PostgreSQL Global Development Group
@@ -2484,6 +2484,7 @@ dch_date(int arg, char *inout, int suf, bool is_to_char, bool is_interval,
else
{
sscanf(inout, "%1d", &tmfc->d);
+ tmfc->d--;
return strspace_len(inout) + 1 + SKIP_THth(suf);
}
break;
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /