From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Jeevan Chalke <jeevan(dot)chalke(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Add LINE: hint when schemaname.typename is a non-existent schema |
Date: | 2015-03-18 11:52:13 |
Message-ID: | 20150318115213.GT3636@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Jeevan Chalke wrote:
> Álvaro,
>
> I think, there are few open questions here and thus marking it back to "Waiting on Author".
>
> Please have your views on the review comments already posted.
For some reason I missed your previous email.
> Also make changes as Tom suggested about placing pstate at the beginning.
Sure.
> 1.
> postgres=# create or replace function
> f1(a abc.test.id%type) returns int as
> $$ select 1; $$
> language sql;
> ERROR: schema "abc" does not exist
>
> Is that expected?
Type resolution for function arguments happens at execution time,
in interpret_function_parameter_list() as called by CreateFunction().
We don't have a pstate at that point which is why location is not
reported. Fixing that seems like a whole new project.
> 2.
> Also what about pushing setup_parser_errposition_callback() inside func_get_detail() as well, just to limit it for namespace lookup?
Hm, that sounds more reasonable. Actually it means we have to drill
all the way down to FuncnameGetCandidates.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2015-03-18 12:35:20 | Re: Custom/Foreign-Join-APIs (Re: [v9.5] Custom Plan API) |
Previous Message | Pavel Stehule | 2015-03-18 11:51:52 | Re: proposal: searching in array function - array_position |