Re: [SQL] ORDER BY with LTREE

2006-02-28 Thread Axel Straschil
Hello Michael! Below is a simple example using the data from your original message Thanks for the example, that realy helps me! Lg, AXEL. ---(end of broadcast)--- TIP 6: explain analyze is your friend

[SQL] ORDER BY with LTREE

2006-02-17 Thread Axel Straschil
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 ( treeLTREE, label TEXT ); and data like treelabel ---

Re: [SQL] How to store directory like structures?

2005-04-03 Thread Axel Straschil
Hello! > psql yourdb < /usr/share/postgresql/contrib/ltree.sql *STRIKE* ... I'm a lucky guy now ;-) Thanks to all! Lg, AXEL. -- "Aber naja, ich bin eher der Forentyp." Wolfibolfi's outing in http://www.informatik-forum.at/showpost.php?p=206342&postcount=10 ---(end of

Re: [SQL] How to store directory like structures?

2005-04-03 Thread Axel Straschil
Hello! > psql yourdb < /usr/share/postgresql/contrib/ltree.sql *STRIKE*, thanks, works perfektyl now! Lg, AXEL. -- "Aber naja, ich bin eher der Forentyp." Wolfibolfi's outing in http://www.informatik-forum.at/showpost.php?p=206342&postcount=10 ---(end of broadcast)---

Re: [SQL] How to store directory like structures?

2005-04-03 Thread Axel Straschil
Hello! > On gentoo (at least on my box) it's installed by default in 8.0, I > believe it was installed by default, too, on 7.4.X Tried with gentoo just under 7.4.x and 8.0.1: axel=# CREATE TABLE test ( path ltree); ERROR: type "ltree" does not exist Any idea? Thanks, AXEL. -- "Aber n

Re: [SQL] How to store directory like structures?

2005-04-03 Thread Axel Straschil
Hello! > I have no experience with those beasts, but what's wrong just untar source, > configure and compile by hand ? + Testing and maybe reinstall all stuff depending on posgressql on that server every release you want to go with ;-) Lg, AXEL. -- "Aber naja, ich bin eher der Forentyp." Wolfib

Re: [SQL] How to store directory like structures?

2005-04-03 Thread Axel Straschil
Hello! >> I found, http://www.sai.msu.su/~megera/postgres/gist/ltree/ which seems > what's a problem with ltree ? I think ltree would be exactly what I need, the Problem ist that I've got absolutly no Idea how to get that thing into a running Pg 7.4 under Gentoo and a Pg 7.3 under Fedora? Is th

[SQL] How to store directory like structures?

2005-04-03 Thread Axel Straschil
Hello! I want to store some structure like: CREATE TABLE node ( nodeid SERIAL PRIMARY KEY, parent INT REFERENCES node(nodeid) ON UPDATE CASCADE ON DELETE CASCADE, label TEXT, UNIQUE (parent, label), ... data ...