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 Tom Lane <tgl@sss.pgh.pa.us>
Re: 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 Tom Lane <tgl@sss.pgh.pa.us>
Re: Add LINE: hint when schemaname.typename is a non-existent schema Jeevan Chalke <jeevan.chalke@gmail.com>
Re: Add LINE: hint when schemaname.typename is a
non-existent schema Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Add LINE: hint when schemaname.typename is a non-existent schema Tom Lane <tgl@sss.pgh.pa.us>
Re: Add LINE: hint when schemaname.typename is a non-existent schema Jeevan Chalke <jeevan.chalke@gmail.com>
Re: Add LINE: hint when schemaname.typename is a non-existent schema Tom Lane <tgl@sss.pgh.pa.us>
Re: Add LINE: hint when schemaname.typename is a
non-existent schema Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Add LINE: hint when schemaname.typename is a
non-existent schema Alvaro Herrera <alvherre@2ndquadrant.com>
Re: Add LINE: hint when schemaname.typename is a
non-existent schema Robert Haas <robertmhaas@gmail.com>
Ryan Kelly 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 по дате отправления
От: Robert Haas
Дата: