Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0548497

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 reportfrom Ron Mayer.
1 parent56c8877 commit0548497

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)

[8]ページ先頭

©2009-2025 Movatter.jp