Re: Recursive Arrays 101

From: Achilleas Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Recursive Arrays 101
Date: 2015-11-04 10:03:57
Message-ID: 5639D80D.7010204@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sorry for being kind of late to the party (I was in 2015.PgConf.EU !!), and not having read
most of the replies, what we have been successfully doing for this problem for our app
is do it this way :
parents int[] -- where parents stores the path from the node to the root of the tree
and then have those indexes :
btree (first(parents))
btree (level(parents)) -- length
btree (last(parents))
gin (parents gin__int_ops) -- the most important

This has been described as "genealogical tree" approach, and works very good, IMHO much better
than nested sets.

On 27/10/2015 14:46, David G. Johnston wrote:
> On Monday, October 26, 2015, John R Pierce <pierce(at)hogranch(dot)com <mailto:pierce(at)hogranch(dot)com>> wrote:
>
> On 10/26/2015 7:44 PM, David G. Johnston wrote:
>
> ​They both have their places. It is usually quite difficult to automate and version control the manual work that goes into using command line tools.​
>
>
> I hope you mean, its difficult to automate and version control clickity-clicky work that goes into using GUI tools
>
> automating shell scripts is trivial. putting said shell scripts into version control is also trivial.
>
>
> Yes, that is a typo on my part.

--
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Albe Laurenz 2015-11-04 10:16:22 Re: pg_archivecleanup not deleting anything?
Previous Message M Tarkeshwar Rao 2015-11-04 09:21:25 Query regarding