Re: Summing & Grouping in a Hierarchical Structure - Mailing list pgsql-sql

From Bryan L Nuse
Subject Re: Summing & Grouping in a Hierarchical Structure
Date
Msg-id 7BEBA741-E416-4000-BE2D-B9196683A2A4@uga.edu
Whole thread Raw
In response to Re: Summing & Grouping in a Hierarchical Structure  (Don Parris <parrisdc@gmail.com>)
Responses Re: Summing & Grouping in a Hierarchical Structure
List pgsql-sql
>  That said, now that I have finally gotten the chance to try ltree, I think I like it a lot.

Hello Don,

Yes, after looking at ltree --which I had not done before-- I have to agree with Misa that it looks like the right
solutionfor your problem.  That is not to say that "brute force" SQL couldn't provide a workable arrangement; but ltree
looksvery flexible, especially as it allows you to assign cost values to non-terminal nodes.  If it were me, though,
I'dstill make use of VIEWs to report results of the workhorse queries:  staring at a list of items like
"Transportation.Bicycle.Gear.Chain_ring"sounds like headache.  That's a matter of taste, of course. 

Bryan



pgsql-sql by date:

Previous
From: Don Parris
Date:
Subject: Re: Summing & Grouping in a Hierarchical Structure
Next
From: Don Parris
Date:
Subject: Re: Summing & Grouping in a Hierarchical Structure