Skip to content

Commit c963933

Browse files
committed
fix late updates (e.g. 1.1 => 1.4)
1 parent 7e2ef6c commit c963933

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/pl_range_funcs.c

+4-1
Original file line numberDiff line numberDiff line change
@@ -870,8 +870,11 @@ validate_interval_value(PG_FUNCTION_ARGS)
870870
/*
871871
* Fetch partitioning expression's type using
872872
* either user's expression or parsed expression.
873+
*
874+
* NOTE: we check number of function's arguments
875+
* in case of late updates (e.g. 1.1 => 1.4).
873876
*/
874-
if (PG_ARGISNULL(ARG_EXPRESSION_P))
877+
if (PG_ARGISNULL(ARG_EXPRESSION_P) || PG_NARGS() <= ARG_EXPRESSION_P)
875878
{
876879
Datum expr_datum;
877880

0 commit comments

Comments
 (0)