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

Commit1a1ad63

Browse files
committed
date_recv should accept infinities.
Reported by James William Pye.
1 parent9529f4d commit1a1ad63

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/adt/date.c,v 1.150 2010/01/02 16:57:53 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/adt/date.c,v 1.151 2010/02/18 04:31:16 itagaki Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -208,8 +208,10 @@ date_recv(PG_FUNCTION_ARGS)
208208
result= (DateADT)pq_getmsgint(buf,sizeof(DateADT));
209209

210210
/* Limit to the same range that date_in() accepts. */
211-
if (result<-POSTGRES_EPOCH_JDATE||
212-
result >=JULIAN_MAX-POSTGRES_EPOCH_JDATE)
211+
if (DATE_NOT_FINITE(result))
212+
/* ok */ ;
213+
elseif (result<-POSTGRES_EPOCH_JDATE||
214+
result >=JULIAN_MAX-POSTGRES_EPOCH_JDATE)
213215
ereport(ERROR,
214216
(errcode(ERRCODE_DATETIME_VALUE_OUT_OF_RANGE),
215217
errmsg("date out of range")));

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp