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 @@ -1431,13 +1431,15 @@ daterange_canonical(PG_FUNCTION_ARGS)
14311431 if (empty )
14321432 PG_RETURN_RANGE_P (r );
14331433
1434- if (!lower .infinite && !DATE_NOT_FINITE (lower .val ) && !lower .inclusive )
1434+ if (!lower .infinite && !DATE_NOT_FINITE (DatumGetDateADT (lower .val )) &&
1435+ !lower .inclusive )
14351436 {
14361437 lower .val = DirectFunctionCall2 (date_pli , lower .val , Int32GetDatum (1 ));
14371438 lower .inclusive = true;
14381439 }
14391440
1440- if (!upper .infinite && !DATE_NOT_FINITE (upper .val ) && upper .inclusive )
1441+ if (!upper .infinite && !DATE_NOT_FINITE (DatumGetDateADT (upper .val )) &&
1442+ upper .inclusive )
14411443 {
14421444 upper .val = DirectFunctionCall2 (date_pli , upper .val , Int32GetDatum (1 ));
14431445 upper .inclusive = false;
You can’t perform that action at this time.
0 commit comments