pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PFC <lists@boutiquenumerique.com>
To: Oleg Bartunov <oleg@sai.msu.su>
To: Axel Straschil <axel@straschil.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: How to store directory like structures?
Date: Sun, 03 Apr 2005 21:57:29 +0200
Message-ID: <op.son9p3qhth1vuj@localhost> (raw)
In-Reply-To: <slrnd509sg.fls.axel@m2.sine>
References: <slrnd4vghu.tp.axel@m2.sine>
	<slrnd509sg.fls.axel@m2.sine>
	<Pine.GSO.4.62.0504032059420.15865@ra.sai.msu.su>
	<op.son4ths6th1vuj@localhost>
	<slrnd50fii.gfo.axel@m2.sine>
	<Pine.GSO.4.62.0504032323370.15865@ra.sai.msu.su>



> 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...



view thread (12+ messages)  latest in thread

Message-ID: <op.son9p3qhth1vuj@localhost>
Permalink:  ../op.son9p3qhth1vuj@localhost/
Also on:    postgresql.org/message-id/op.son9p3qhth1vuj@localhost

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: lists@boutiquenumerique.com, oleg@sai.msu.su, axel@straschil.com
  Subject: Re: How to store directory like structures?
  In-Reply-To: <op.son9p3qhth1vuj@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox