Tom Lane 0dcf68e5a1 Fix some minor error-checking oversights in ParseFuncOrColumn().
Recent additions to ParseFuncOrColumn to make it reject non-procedure
functions in CALL were neither adequate nor documented.  Reorganize
the code to ensure uniform results for all the cases that should be
rejected.  Also, use ERRCODE_WRONG_OBJECT_TYPE for this case as well
as the converse case of a procedure in a non-CALL context.  The
original coding used ERRCODE_UNDEFINED_FUNCTION which seems wrong,
and is certainly inconsistent with the adjacent wrong-kind-of-routine
errors.

This reorganization also causes the checks for aggregate decoration with
a non-aggregate function to be made in the FUNCDETAIL_COERCION case;
that they were not is a long-standing oversight.

Discussion: https://postgr.es/m/14497.1529089235@sss.pgh.pa.us
2018-06-16 14:11:14 -04:00
..
2018-06-04 16:17:34 -04:00
2018-06-09 09:33:53 -07:00
2018-06-07 23:37:09 -04:00
2018-01-02 23:30:12 -05:00
2018-05-21 12:29:52 -04:00
2018-04-26 14:47:16 -04:00
2018-03-30 17:33:04 -07:00
2017-05-15 12:19:54 -04:00