Re: How to store directory like structures? - Mailing list pgsql-sql

From PFC
Subject Re: How to store directory like structures?
Date
Msg-id op.son9p3qhth1vuj@localhost
Whole thread Raw
In response to Re: How to store directory like structures?  (Axel Straschil <axel@straschil.com>)
List pgsql-sql

> you need to load ltree into your database !
> psql yourdb < ltree.sql
>
> use 'locate ltree.sql' to find if ltree is installed
Yeah, I remember now having to do that, but the binary module definitely  
was here without having to do anything besides "emerge postgresql" :

peufeu@nyuu peufeu $ locate ltree.so
/usr/lib/postgresql/ltree.so

peufeu@nyuu peufeu $ locate ltree.sql
/usr/share/postgresql/contrib/ltree.sql
So just :

psql yourdb < /usr/share/postgresql/contrib/ltree.sql
And you should be OK.Really this module is amazing. You can put a trigger on the table so  
that, for instance, the path is created automatically from the element  
name and the parent_id, that kind of things. I remember search was also  
really fast and you can use complex queries without CONNECT BY...


pgsql-sql by date:

Previous
From: Oleg Bartunov
Date:
Subject: Re: How to store directory like structures?
Next
From: Greg Stark
Date:
Subject: Re: Date/Time Conversion