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

Commit477ebfc

Browse files
committed
Fix error in commite6feef5.
I was careless passing a datum directly to DATE_NOT_FINITE withoutcalling DatumGetDateADT() first.Backpatch-through: 9.4
1 parentf5f20de commit477ebfc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,13 +1430,15 @@ daterange_canonical(PG_FUNCTION_ARGS)
14301430
if (empty)
14311431
PG_RETURN_RANGE_P(r);
14321432

1433-
if (!lower.infinite&& !DATE_NOT_FINITE(lower.val)&& !lower.inclusive)
1433+
if (!lower.infinite&& !DATE_NOT_FINITE(DatumGetDateADT(lower.val))&&
1434+
!lower.inclusive)
14341435
{
14351436
lower.val=DirectFunctionCall2(date_pli,lower.val,Int32GetDatum(1));
14361437
lower.inclusive= true;
14371438
}
14381439

1439-
if (!upper.infinite&& !DATE_NOT_FINITE(upper.val)&&upper.inclusive)
1440+
if (!upper.infinite&& !DATE_NOT_FINITE(DatumGetDateADT(upper.val))&&
1441+
upper.inclusive)
14401442
{
14411443
upper.val=DirectFunctionCall2(date_pli,upper.val,Int32GetDatum(1));
14421444
upper.inclusive= false;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp