Re: Recursive Arrays 101

From: David Blomstrom <david(dot)blomstrom(at)gmail(dot)com>
To: Rob Sargent <robjsargent(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Recursive Arrays 101
Date: 2015-11-04 22:42:46
Message-ID: CAA54Z0hsXt7pmUjhUNYnqq7vXa5jUtGBFdf7BVU=jc-7j8v74A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanks for that tip, Achilleas.

On Wed, Nov 4, 2015 at 7:53 AM, Rob Sargent <robjsargent(at)gmail(dot)com> wrote:

> On 11/04/2015 03:03 AM, Achilleas Mantzios wrote:
>
> 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.
>
> Is there a more complete description of this approach available? By the
> title one might assume could be applied to populations as opposed to
> phylogeny (the OP's use case). Does it deal with consanguinity? Does it
> perform well going "up" the tree (which is of course branched at every
> level)?
>

--
David Blomstrom
Writer & Web Designer (Mac, M$ & Linux)
www.geobop.org

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Michael Paquier 2015-11-05 01:57:53 Re: Deadlock detected after pg_repack receives SIGINT
Previous Message Bill Moran 2015-11-04 17:37:31 Re: Auto-analyse on insert operations