contrib/tree issues

Поиск
Список
Период
Сортировка
От achill@matrix.gatewaynet.com
Тема contrib/tree issues
Дата
Msg-id Pine.LNX.4.44.0205291921060.15675-100000@matrix.gatewaynet.com
обсуждение исходный текст
Ответ на Trees in SQL  (Gregory Brauer <greg@wildbrain.com>)
Ответы Re: contrib/tree issues  (Oleg Bartunov <oleg@sai.msu.su>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Can you help with this JOIN?
Следующее
От: achill@matrix.gatewaynet.com
Дата:
Сообщение: Re: Trees in SQL