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

Commit08c8e89

Browse files
committed
Un-break ecpg test suite under --disable-integer-datetimes.
Commit4318dae broke it. The change insub-second precision at extreme dates is normal. The inconsistenttruncation vs. rounding is essentially a bug, albeit a longstanding one.Back-patch to 8.4, like the causative commit.
1 parent1e81f84 commit08c8e89

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

‎src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ static char *times[] = { "0:04",
6161
"1:59 PDT",
6262
"13:24:40 -8:00",
6363
"13:24:40.495+3",
64-
"13:24:40.123456789+3",
64+
"13:24:40.123456123+3",
6565
NULL };
6666

6767
char*intervals[]= {"1 minute",
@@ -145,7 +145,8 @@ main(void)
145145
sprintf(t,"%s %s",dates[i],times[j]);
146146
ts1=PGTYPEStimestamp_from_asc(t,NULL);
147147
text=PGTYPEStimestamp_to_asc(ts1);
148-
if (i!=19||j!=3)/* timestamp as integer or double differ for this case */
148+
/* skip outputs sensitive to USE_INTEGER_DATETIMES */
149+
if (i!=19|| (j!=3&&j!=4))
149150
printf("TS[%d,%d]: %s\n",
150151
i,j,errno ?"-" :text);
151152
free(text);

‎src/interfaces/ecpg/test/expected/pgtypeslib-dt_test2.stdout

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ Date[19]: 0099-01-08 BC (N - F)
103103
TS[19,0]: 0099-01-08 00:04:00 BC
104104
TS[19,1]: 0099-01-08 01:59:00 BC
105105
TS[19,2]: 0099-01-08 13:24:40 BC
106-
TS[19,4]: 0099-01-08 13:24:40.123456 BC
107106
Date[20]: - (N - T)
108107
Date[21]: - (N - T)
109108
interval[0]: @ 1 min

‎src/interfaces/ecpg/test/pgtypeslib/dt_test2.pgc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static char *times[] = { "0:04",
4343
"1:59 PDT",
4444
"13:24:40 -8:00",
4545
"13:24:40.495+3",
46-
"13:24:40.123456789+3",
46+
"13:24:40.123456123+3",
4747
NULL };
4848

4949
char *intervals[] = { "1 minute",
@@ -110,7 +110,8 @@ main(void)
110110
sprintf(t, "%s %s", dates[i], times[j]);
111111
ts1 = PGTYPEStimestamp_from_asc(t, NULL);
112112
text = PGTYPEStimestamp_to_asc(ts1);
113-
if (i != 19 || j != 3) /* timestamp as integer or double differ for this case */
113+
/* skip outputs sensitive to USE_INTEGER_DATETIMES */
114+
if (i != 19 || (j != 3 && j != 4))
114115
printf("TS[%d,%d]: %s\n",
115116
i, j, errno ? "-" : text);
116117
free(text);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp