pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bryan L Nuse <nuse@uga.edu>
To: Don Parris <parrisdc@gmail.com>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: Summing & Grouping in a Hierarchical Structure
Date: Sat, 23 Feb 2013 16:15:45 +0000
Message-ID: <7BEBA741-E416-4000-BE2D-B9196683A2A4@uga.edu> (raw)
In-Reply-To: <CAJ-7yokLGhpPhYFDPnZ2akQbndBfZ0jEfA+O4LQHDHBcaG-kPg@mail.gmail.com>
References: <CAJ-7yo=cpz0TocY4Qvb5e4=s3FB+VtHT3VV3gbUAz8Uqi7p6pw@mail.gmail.com>
	<CAH3i69moWcM9-mxaK5oiiY3o96X0V82QOyjXVDb2Jb-KrDQjog@mail.gmail.com>
	<CAJ-7yokc9-KzAd3BRrVPwQywz-f7wkBd2N9Cno-eM9m5gjUAww@mail.gmail.com>
	<CAJ-7yo=6dSoydFCEJo_9LSdUuoA1s68SFSwxzbwGh0oAKk0whw@mail.gmail.com>
	<8A586FDE-CC0A-4F26-AD19-1F89C2D9349E@uga.edu>
	<CAJ-7yokLGhpPhYFDPnZ2akQbndBfZ0jEfA+O4LQHDHBcaG-kPg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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 solution for your problem.  That is not to say that "brute force" SQL couldn't provide a workable arrangement; but ltree looks very flexible, especially as it allows you to assign cost values to non-terminal nodes.  If it were me, though, I'd still 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


-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql



view thread (18+ messages)  latest in thread

Message-ID: <7BEBA741-E416-4000-BE2D-B9196683A2A4@uga.edu>
Permalink:  ../7BEBA741-E416-4000-BE2D-B9196683A2A4@uga.edu/
Also on:    postgresql.org/message-id/7BEBA741-E416-4000-BE2D-B9196683A2A4@uga.edu

 · 

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: nuse@uga.edu, parrisdc@gmail.com
  Subject: Re: Summing & Grouping in a Hierarchical Structure
  In-Reply-To: <7BEBA741-E416-4000-BE2D-B9196683A2A4@uga.edu>

* 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