Re: [RFC] nodeToString format and exporting the SQL parser

Поиск
Список
Период
Сортировка
От Michael Tharp
Тема Re: [RFC] nodeToString format and exporting the SQL parser
Дата
Msg-id 4BB8FAA1.1020507@partiallystapled.com
обсуждение исходный текст
Ответ на Re: [RFC] nodeToString format and exporting the SQL parser  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 04/02/2010 04:16 PM, Tom Lane wrote:
> Generally speaking I'm against
> exposing that data structure to clients, because there will inevitably
> be griping when we change it (as we most certainly will).  Your
> complaints boil down to "this is hard to parse from the client side",
> and that already tells me you're doing something that we will refuse
> to support.

Sorry, I got the impression that the node format was intended to be 
stable. If it's for internal use only then I don't suppose my 
suggestions make much sense.

As for the structure of the parse nodes themselves, changes aren't a big 
deal to me. What I'm doing is diffing entire files of DDL, so even if 
the node format changes over time the changes in two files parsed using 
the same code are still evident. In fact, the ambiguities in parsing 
don't really affect this use case much because I don't need exact values 
to detect changes.

Markus' link suggests using the parser for a load balancer, which would 
require that this all be in library form anyway as the balancer cannot 
afford a round trip to the server to parse the query, so maybe I should 
focus my efforts there. Making it a separate library would also resolve 
the compatibility issues as the library could keep its own structures 
regardless of where Postgres goes.

Thanks for the input!

-- m. tharp


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Nice hint on table aliasing!
Следующее
От: Tom Lane
Дата:
Сообщение: Interesting near-bug in shared-dependency management