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

Commit7641224

Browse files
committed
Fix to_date()/to_timestamp() 'D' field for day of week, was off by one.
Converting from char using 'D' doesn't make lots of sense, of course.Report from Brendan Jurd.
1 parenta9eb539 commit7641224

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* -----------------------------------------------------------------------
22
* formatting.c
33
*
4-
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.123 2007/02/13 02:00:55 momjian Exp $
4+
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.124 2007/02/14 05:10:55 momjian Exp $
55
*
66
*
77
* 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,
24842484
else
24852485
{
24862486
sscanf(inout,"%1d",&tmfc->d);
2487+
tmfc->d--;
24872488
returnstrspace_len(inout)+1+SKIP_THth(suf);
24882489
}
24892490
break;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp