Re: How to store directory like structures?

Поиск
Список
Период
Сортировка
От PFC
Тема Re: How to store directory like structures?
Дата
Msg-id op.son9p3qhth1vuj@localhost
обсуждение исходный текст
Ответ на Re: How to store directory like structures?  (Axel Straschil <axel@straschil.com>)
Список 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 по дате отправления:

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Re: How to store directory like structures?
Следующее
От: Greg Stark
Дата:
Сообщение: Re: Date/Time Conversion