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

Commit7fb2753

Browse files
committed
Modify the new to_timestamp implementation so that end-of-format-string
is treated like a non-digit separator. This fixes the inconsistency inexamples like:to_timestamp('2008-01-2', 'YYYY-MM-DD') -- didn't workandto_timestamp('2008-1-02', 'YYYY-MM-DD') -- did work
1 parentec543db commit7fb2753

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
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.150 2008/11/10 17:36:53 heikki Exp $
4+
* $PostgreSQL: pgsql/src/backend/utils/adt/formatting.c,v 1.151 2008/12/01 17:11:18 heikki Exp $
55
*
66
*
77
* Portions Copyright (c) 1999-2008, PostgreSQL Global Development Group
@@ -1678,8 +1678,9 @@ is_next_separator(FormatNode *n)
16781678
*/
16791679
n++;
16801680

1681+
/* end of format string is treated like a non-digit separator */
16811682
if (n->type==NODE_TYPE_END)
1682-
returnFALSE;
1683+
returnTRUE;
16831684

16841685
if (n->type==NODE_TYPE_ACTION)
16851686
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp