contrib/tree issues - Mailing list pgsql-sql

From achill@matrix.gatewaynet.com
Subject contrib/tree issues
Date
Msg-id Pine.LNX.4.44.0205291921060.15675-100000@matrix.gatewaynet.com
Whole thread Raw
In response to Trees in SQL  (Gregory Brauer <greg@wildbrain.com>)
Responses Re: contrib/tree issues  (Oleg Bartunov <oleg@sai.msu.su>)
List pgsql-sql
I have been playing with the tree package, and so far
it seems fast.

But i have some questions:

How can we find  "maximum" direct child of a node?

e.g.
The table has as:

dynatree=# SELECT node from achtree ;node  
-------121.11.1.11.2
(5 rows)

dynatree=# 

Now we find the children of '1' of level 2:

dynatree=# SELECT node from achtree where node <* '1.*.0';node 
------1.11.2
(2 rows)

dynatree=# 

Now if we want to insert another level 2 child of '1',
how can we get the current maximum value of level 2 children of node '1'??
(in this case 2), so that we can insert '1.3' to the table???

Also, i want to ask if somebody has extended postgresql's jdbc 
implemantation to include support for bitrees,entrees.

One maybe slow solution for both of the above would be to
be able to cast e.g. entree to text, so that

a) taking the lexicographically maximum bitree value would give the 
maximum current child, and
b) java intergration would be trivial through java.lang.String.

Thanx



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Can you help with this JOIN?
Next
From: achill@matrix.gatewaynet.com
Date:
Subject: Re: Trees in SQL