Re: [HACKERS] Questions about parser code

2007-01-30 Thread Gregory Stark
So I have basic non-recursive queries working. However currently it's essentially inlining the subquery at every call-site which obvious will never handle recursive queries and in fact doesn't even do what people expect from the basic syntax. The use case for the WITH syntax is when you have an ex

Re: [HACKERS] Questions about parser code

2007-01-30 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > Is it ok to scribble on and reuse objects from the parse tree when generating > the transformed tree? Or should the transformed query object be built from > freshly allocated nodes? We do both already; take your pick. If you do the former, though, I sug

[HACKERS] Questions about parser code

2007-01-30 Thread Gregory Stark
Is it considered ok for the pstate data structures to have references to nodes in the query tree? Or should they do copyObject() if they need to refer to them? Is it ok to scribble on and reuse objects from the parse tree when generating the transformed tree? Or should the transformed query obje