Commit 0548497c authored by Tom Lane's avatar Tom Lane

int_aggregate's int_enum() doesn't work correctly with arrays that

aren't 1-D, so give an error message instead of failing.  Per report
from Ron Mayer.
parent 56c88772
......@@ -242,6 +242,9 @@ int_enum(PG_FUNCTION_ARGS)
pc->p = p;
pc->flags = 0;
}
/* Now that we have a detoasted array, verify dimensions */
if (pc->p->a.ndim != 1)
elog(ERROR, "int_enum only accepts 1-D arrays");
pc->num = 0;
fcinfo->context = (Node *) pc;
MemoryContextSwitchTo(oldcontext);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment