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 @@ -1366,13 +1366,15 @@ daterange_canonical(PG_FUNCTION_ARGS)
1366
1366
if (empty )
1367
1367
PG_RETURN_RANGE (r );
1368
1368
1369
- if (!lower .infinite && !DATE_NOT_FINITE (lower .val ) && !lower .inclusive )
1369
+ if (!lower .infinite && !DATE_NOT_FINITE (DatumGetDateADT (lower .val )) &&
1370
+ !lower .inclusive )
1370
1371
{
1371
1372
lower .val = DirectFunctionCall2 (date_pli , lower .val , Int32GetDatum (1 ));
1372
1373
lower .inclusive = true;
1373
1374
}
1374
1375
1375
- if (!upper .infinite && !DATE_NOT_FINITE (upper .val ) && upper .inclusive )
1376
+ if (!upper .infinite && !DATE_NOT_FINITE (DatumGetDateADT (upper .val )) &&
1377
+ upper .inclusive )
1376
1378
{
1377
1379
upper .val = DirectFunctionCall2 (date_pli , upper .val , Int32GetDatum (1 ));
1378
1380
upper .inclusive = false;
You can’t perform that action at this time.
0 commit comments