Skip to content

Commit 0548497

Browse files
committed
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.
1 parent 56c8877 commit 0548497

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

contrib/intagg/int_aggregate.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,9 @@ int_enum(PG_FUNCTION_ARGS)
242242
pc->p = p;
243243
pc->flags = 0;
244244
}
245+
/* Now that we have a detoasted array, verify dimensions */
246+
if (pc->p->a.ndim != 1)
247+
elog(ERROR, "int_enum only accepts 1-D arrays");
245248
pc->num = 0;
246249
fcinfo->context = (Node *) pc;
247250
MemoryContextSwitchTo(oldcontext);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy