Re: [SQL] Proposal of hierarchical queries, a la Oracle

2002-11-19 Thread Joe Conway
Evgen Potemkin wrote: Joe, i've made it already,as send first 'Proposal ...' message, but found a small bug. within nearest days i'll fix it, and post the patch to pgsql-patches. Please note that there was no patch attached to your initial proposal (assuming this is the message you are referr

Re: [SQL] Proposal of hierarchical queries, a la Oracle

2002-11-19 Thread Oleg Bartunov
On Tue, 19 Nov 2002, Evgen Potemkin wrote: > Oleg, > > i've read that info. mine CONNECT BY patch is based on internal pg's query >processing, > from that point it's a kind of ORDER BY or GROUP BY clause. Index access is >implemented by > lower layer. ok. I see. > > regards, > --- > .evgen >

Re: [SQL] Proposal of hierarchical queries, a la Oracle

2002-11-19 Thread Evgen Potemkin
-Josh, i don't be so thrilled:), with current implementation of /contrib/tablefunc mine problem sill remains: i need to sort tree leaves in some order, independent of tree itself. this can be fixed (in tablefunc) by addition to connectby() one more field like 'order_by' or so. but it will be more

Re: [SQL] Proposal of hierarchical queries, a la Oracle

2002-11-19 Thread Evgen Potemkin
Joe, i've made it already,as send first 'Proposal ...' message, but found a small bug. within nearest days i'll fix it, and post the patch to pgsql-patches. i've described why i can't use connectby() in message to Josh Berkus. i'll enhance CONNECT BY as clause, but not as function. i think it's m

Re: [SQL] Proposal of hierarchical queries, a la Oracle

2002-11-19 Thread Evgen Potemkin
Oleg, i've read that info. mine CONNECT BY patch is based on internal pg's query processing, from that point it's a kind of ORDER BY or GROUP BY clause. Index access is implemented by lower layer. regards, --- .evgen On Sat, 16 Nov 2002, Oleg Bartunov wrote: > Evgen, > > read info about ltr

Re: [SQL] Proposal of hierarchical queries, a la Oracle

2002-11-16 Thread Joe Conway
Josh Berkus wrote: Evgren, I want to propose the patch for adding the hierarchical queries posibility. It allows to construct queries a la Oracle for ex: SELECT a,b FROM t CONNECT BY a PRIOR b START WITH cond; You'll be thrilled to know that this has already been implemented in PostgreSQL 7.

Re: [SQL] Proposal of hierarchical queries, a la Oracle

2002-11-16 Thread Evgen Potemkin
I was have made a module like ltree, i don't know how you implement it, but mine doesn't fit. The problem : for ex. you need to select a tree, but with childs of each parent is sorted. in my module i've defined a tree path as set of numbers separated by dot ('1.234.456.789'::hier for ex.), a compa

Re: [SQL] Proposal of hierarchical queries, a la Oracle

2002-11-16 Thread Josh Berkus
Evgren, > I want to propose the patch for adding the hierarchical queries > posibility. > It allows to construct queries a la Oracle for ex: > SELECT a,b FROM t CONNECT BY a PRIOR b START WITH cond; You'll be thrilled to know that this has already been implemented in PostgreSQL 7.3, as a /contrib

Re: [SQL] Proposal of hierarchical queries, a la Oracle

2002-11-16 Thread Oleg Bartunov
Evgen, read info about ltree module http://www.sai.msu.su/~megera/postgres/gist/ltree/ Do you have implemented indexed access ? regards, Oleg On Sat, 16 Nov 2002, Evgen Potemkin wrote: > I was have made a module like ltree, i don't know how you implement it, > but mine

Re: [SQL] Proposal of hierarchical queries, a la Oracle

2002-11-15 Thread Oleg Bartunov
Evgen, you'd need to post your message and patch to hackers mailing list. btw, did you try contrib/ltree module ? regards, Oleg On Fri, 15 Nov 2002, Evgen Potemkin wrote: > > Hi there! > > I want to propose the patch for adding the hierarchical queries posibility. > It allows

[SQL] Proposal of hierarchical queries, a la Oracle

2002-11-15 Thread Evgen Potemkin
Hi there! I want to propose the patch for adding the hierarchical queries posibility. It allows to construct queries a la Oracle for ex: SELECT a,b FROM t CONNECT BY a PRIOR b START WITH cond; I've seen this type of queries often made by adding a new type, which stores position of row in the tre