1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-05 07:21:24 +03:00

Setup cursor position for schema-qualified elements

This makes any errors thrown while looking up such schemas report the
position of the error.

Author: Ryan Kelly
Reviewed by: Jeevan Chalke, Tom Lane
This commit is contained in:
Alvaro Herrera
2015-03-18 14:48:02 -03:00
parent 0d83138974
commit b8d226b4f9
5 changed files with 43 additions and 10 deletions

View File

@ -93,6 +93,7 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs,
Oid vatype;
FuncDetailCode fdresult;
char aggkind = 0;
ParseCallbackState pcbstate;
/*
* If there's an aggregate filter, transform it using transformWhereClause
@ -235,12 +236,18 @@ ParseFuncOrColumn(ParseState *pstate, List *funcname, List *fargs,
* type. We'll fix up the variadic case below. We may also have to deal
* with default arguments.
*/
setup_parser_errposition_callback(&pcbstate, pstate, location);
fdresult = func_get_detail(funcname, fargs, argnames, nargs,
actual_arg_types,
!func_variadic, true,
&funcid, &rettype, &retset,
&nvargs, &vatype,
&declared_arg_types, &argdefaults);
cancel_parser_errposition_callback(&pcbstate);
if (fdresult == FUNCDETAIL_COERCION)
{
/*