aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_func.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2015-03-18 14:48:02 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2015-03-18 14:48:02 -0300
commitb8d226b4f9691c7afb986dbaaf3f6ff7b203d1b5 (patch)
tree22edcc6d4eb91685d02d0bdb8421523ecd85cb99 /src/backend/parser/parse_func.c
parent0d831389749a3baaced7b984205b9894a82444b9 (diff)
downloadpostgresql-b8d226b4f9691c7afb986dbaaf3f6ff7b203d1b5.tar.gz
postgresql-b8d226b4f9691c7afb986dbaaf3f6ff7b203d1b5.zip
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
Diffstat (limited to 'src/backend/parser/parse_func.c')
-rw-r--r--src/backend/parser/parse_func.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/backend/parser/parse_func.c b/src/backend/parser/parse_func.c
index 53bbaecac39..1385776f6bd 100644
--- a/src/backend/parser/parse_func.c
+++ b/src/backend/parser/parse_func.c
@@ -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)
{
/*