Re: Hierarchical queries a la Oracle. Patch. - Mailing list pgsql-patches

From Tom Lane
Subject Re: Hierarchical queries a la Oracle. Patch.
Date
Msg-id 3300.1038027324@sss.pgh.pa.us
Whole thread Raw
In response to Hierarchical queries a la Oracle. Patch.  (Evgen Potemkin <evgent@ns.terminal.ru>)
Responses Re: Hierarchical queries a la Oracle. Patch.
Re: Hierarchical queries a la Oracle. Patch.
List pgsql-patches
Evgen Potemkin <evgent@ns.terminal.ru> writes:
> This is a patch which allows PG to make hierarchical queries a la Oracle do.

This is an extremely large patch with an extreme paucity of
documentation.  For example, I searched in vain for any explanation of
what the varfake field does or why it's necessary to add such a field
to every single Var node.  That's a nontrivial amount of overhead to
pay for a feature that relatively few people will use.  (And if it is
needed, you've surely neglected to deal with it in an awful lot of
places that create or manipulate Vars.  Perhaps a new node type would
be a better idea than overloading Var like this.  Misusing Const is a
bad idea too.)

I'm also wondering what you may have broken in altering the handling of
HAVING clauses in planner.c.  What's going on there?

A more global concern is whether this really implements what Oracle
calls CONNECT BY.  I had the idea that that was a deeper feature than
just controlling the ordering of output, which AFAICT is what this does.
Also, the documents I've been able to find on the Web suggest that
Oracle's view of the syntax for the feature is only tenuously related
to what you've implemented here.

            regards, tom lane

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Transaction safe Truncate
Next
From: Tom Lane
Date:
Subject: Re: Hierarchical queries a la Oracle. Patch.