"Strydom, Matthys" <[email protected]> writes:
> Hi All,
> Several SQL-callable aggregate support functions accept an int8[]
> transition state. They use elog(ERROR) when the supplied state does not
> have the expected two-element shape. This means a direct call such as:

>     SELECT int8_avg(ARRAY[1]::int8[]);

> reports SQLSTATE XX000.

> The attached patch reports ERRCODE_ARRAY_SUBSCRIPT_ERROR (2202E)
> instead. This matches existing array-shape checks, including the
> array_agg state handling.

I don't think this is worth the trouble.  It's not reasonable for
people to call these functions directly --- indeed there's been
discussion about making that impossible, and then stripping out some
of these error checks.

                        regards, tom lane


Reply via email to