Re: [SQL] Using Ltree For Hierarchical Structures

2013-02-26 Thread Misa Simic
2013/2/26 Thomas Kellerer > Don Parris wrote on 24.02.2013 23:20: > > With many thanks to Misa and others who helped out with my question >> about working with hierarchical data, I have now written a blog post >> on how I implemented the ltree module to solve my problem. >> >> http://dcparris.ne

Re: [SQL] Using Ltree For Hierarchical Structures

2013-02-26 Thread Don Parris
On Tue, Feb 26, 2013 at 2:30 PM, Igor Neyman wrote: > > > From: Don Parris [mailto:parri...@gmail.com] > Sent: Tuesday, February 26, 2013 1:23 PM > To: Misa Simic > Cc: Igor Neyman; pgsql-sql@postgresql.org > Subject: Re: [SQL] Using Ltree For Hierarchical Structures > > Hi Igor, > As Misa points

Re: [SQL] Using Ltree For Hierarchical Structures

2013-02-26 Thread Igor Neyman
From: Don Parris [mailto:parri...@gmail.com] Sent: Tuesday, February 26, 2013 1:23 PM To: Misa Simic Cc: Igor Neyman; pgsql-sql@postgresql.org Subject: Re: [SQL] Using Ltree For Hierarchical Structures Hi Igor, As Misa points out, my original design used 2 tables - category & line-items.  Eit

Re: [SQL] Using Ltree For Hierarchical Structures

2013-02-26 Thread Thomas Kellerer
Don Parris wrote on 24.02.2013 23:20: With many thanks to Misa and others who helped out with my question about working with hierarchical data, I have now written a blog post on how I implemented the ltree module to solve my problem. http://dcparris.net/2013/02/24/using-ltree-hierarchical-postgr

Re: [SQL] Using Ltree For Hierarchical Structures

2013-02-26 Thread Don Parris
Hi Igor, As Misa points out, my original design used 2 tables - category & line-items. Either way it's two tables.The biggest difference lies in the approach to summing line-items by various levels of category - with each branch of the tree having different levels. I cannot speak to performa

Re: [SQL] Creating a new database with a TEMPLATE did not work

2013-02-26 Thread mkumbale
Adrian: Thanks for the prompt reply. I was able to create a new DB by renaming Default to another name. This was a carry over from our project which was previously using SQLExpress. Thanks again for the reply. Regards, Murali -- View this message in context: http://postgresql.1045698.n5.

Re: [SQL] Using Ltree For Hierarchical Structures

2013-02-26 Thread Misa Simic
Hi Igor, I agree it is all "in the eyes of beholder". Would be good if you can show how to achieve the goal (Summing on Top Levels categories in hierarchy) with CTE? For example show all categories in level 2 (x), and sum amounts for each... (Sum takes all amounts from all transactions of its ch

Re: [SQL] Using Ltree For Hierarchical Structures

2013-02-26 Thread Igor Neyman
From: Don Parris [mailto:parri...@gmail.com] Sent: Sunday, February 24, 2013 5:21 PM To: pgsql-sql@postgresql.org Subject: Using Ltree For Hierarchical Structures Hi all, With many thanks to Misa and others who helped out with my question about working with hierarchical data, I have now writte