Hello!
Im working with the ltree [1] datatype and have labels that can not used
directly in ltree and a want to get a tree like strukture ordered by the
labels.
IE, I've got a table
CREATE TABLE t
(
tree LTREE,
label TEXT
);
and data like
tree label
--------------------------
root.1 z
root.2 c
root.2.1 a
root.2.2 b
root.3 i
root.4 f
root.4.1 k
root.4.2 c
I need a VIEW that ordery by "by tree but by label in the same hirachie",
so the output should be
root.2 c
root.2.1 a
root.2.2 b
root.4 f
root.4.2 c
root.4.1 k
root.3 i
root.1 z
Any idea?
Thanks,
AXEL.
[1] http://www.sai.msu.su/~megera/postgres/gist/ltree/