File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1338,13 +1338,15 @@ daterange_canonical(PG_FUNCTION_ARGS)
1338
1338
if (empty )
1339
1339
PG_RETURN_RANGE (r );
1340
1340
1341
- if (!lower .infinite && !DATE_NOT_FINITE (lower .val ) && !lower .inclusive )
1341
+ if (!lower .infinite && !DATE_NOT_FINITE (DatumGetDateADT (lower .val )) &&
1342
+ !lower .inclusive )
1342
1343
{
1343
1344
lower .val = DirectFunctionCall2 (date_pli , lower .val , Int32GetDatum (1 ));
1344
1345
lower .inclusive = true;
1345
1346
}
1346
1347
1347
- if (!upper .infinite && !DATE_NOT_FINITE (upper .val ) && upper .inclusive )
1348
+ if (!upper .infinite && !DATE_NOT_FINITE (DatumGetDateADT (upper .val )) &&
1349
+ upper .inclusive )
1348
1350
{
1349
1351
upper .val = DirectFunctionCall2 (date_pli , upper .val , Int32GetDatum (1 ));
1350
1352
upper .inclusive = false;
You can’t perform that action at this time.
0 commit comments