I'm using ltree data type for about 1 or 2 years now. I wan't to here how
you people using this type and how your data is structured.
I use it for our directory service where I have some categories and entries
(classifieds). Right now I have 2 tables. One for categories with ltree
column and table for storing entries, wich have foreign key id_category.
path (ltree type) is generated from id_category, because we use non C
locale so I'm not possible to insert caption into path. So I have to make
same maping betwen id and caption.
I also otput some statistics like, number of entries in categories etc.
Unfortenetly this stats is generated with trigers, because on-the-fly was
Today I was going thru documentation of ltree and find out that ltree can
index such count. I also tried and counting subcategories was very fast.
So my idea is to use ltree on both categories and entries.
But the problem is how to do this without duplicating path etc., what about
ids and how to distict betwen category and entry.
Here I would like to here from you, maybe some of you already acomplish
pgsql-general by date
|Next:||From: Andrew Sullivan||Date: 2004-09-27 14:38:14|
|Subject: Re: core dump on select|
|Previous:||From: Tom Lane||Date: 2004-09-27 14:30:09|
|Subject: Re: could not create socket for statistics collector: Protocol not supported |