8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3842892 commit d79eeefCopy full SHA for d79eeef
contrib/intagg/int_aggregate.c
@@ -243,7 +243,8 @@ int_enum(PG_FUNCTION_ARGS)
243
pc->flags = 0;
244
}
245
/* Now that we have a detoasted array, verify dimensions */
246
- if 8944 span> (pc->p->a.ndim != 1)
+ /* We'll treat a zero-D array as empty, below */
247
+ if (pc->p->a.ndim > 1)
248
elog(ERROR, "int_enum only accepts 1-D arrays");
249
pc->num = 0;
250
fcinfo->context = (Node *) pc;
@@ -252,7 +253,7 @@ int_enum(PG_FUNCTION_ARGS)
252
253
else /* use an existing one */
254
pc = (CTX *) fcinfo->context;
255
/* Are we done yet? */
- if (pc->num >= pc->p->items)
256
+ if (pc->p->a.ndim < 1 || pc->num >= pc->p->items)
257
{
258
/* We are done */
259
if (pc->flags & TOASTED)
0 commit comments