Re: Add LINE: hint when schemaname.typename is a non-existent schema
| От | Tom Lane |
|---|---|
| Тема | Re: Add LINE: hint when schemaname.typename is a non-existent schema |
| Дата | |
| Msg-id | 4293.1422979826@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Add LINE: hint when schemaname.typename is a non-existent schema (Ryan Kelly <rpkelly22@gmail.com>) |
| Ответы |
Re: Add LINE: hint when schemaname.typename is a
non-existent schema
|
| Список | pgsql-hackers |
Ryan Kelly <rpkelly22@gmail.com> writes:
> The attached patch adds a LINE: ... hint when schemaname.typename
> results in a schema which does not exist. I came across this when a
> missing comma in a SELECT list resulted in an error without a location
> in a query a few thousand lines long.
I think this is a good problem to attack, but the proposed patch seems
a bit narrow and brute-force. Surely this isn't the only place where
we're missing an errposition pointer on a "no such schema" error?
It's probably not reasonable to add a pstate argument to
LookupExplicitNamespace itself, given that namespace.c isn't part
of the parser. But you could imagine adding an interface function
in the parser that calls LookupExplicitNamespace and then throws a
position-aware error on failure, and then making sure that all schema
lookups in the parser go through that.
regards, tom lane
В списке pgsql-hackers по дате отправления: