From: PFC <lists@boutiquenumerique.com>
To: Oleg Bartunov <oleg@sai.msu.su>
Cc: pgsql-sql@postgresql.org
Cc: teodor@sigaev.ru
Subject: Re: assorted problems with intarray and other GiST contribs.
Date: Sun, 26 Jun 2005 19:56:08 +0200
Message-ID: <op.sszn3uk9th1vuj@localhost> (raw)
In-Reply-To: <op.sszkzgnith1vuj@localhost>
References: <a053b85772b71eaf158e0354551e72d2@biglumber.com>
<op.sszkzgnith1vuj@localhost>
<Pine.GSO.4.63.0506262136370.26882@ra.sai.msu.su>
Thanks for the quick response !
>> * int_array_aggregate crashes
>
> I don't remember this function :)
You mean it's not part of intarray contrib ?
I thought so !
Sorry !
Then who's responsible for maintenance of it ?
> int4 nlevel(ltree) - returns level of the node.
I had missed this one.
The summer heat has burnt by brain it seems ;)
>
>> - access it like an array (ie. get element N).
>
> subltree, subpath
I know, but I was hoping for something like :
myltree[pos]
instead of the usable, but a bit huge, and probably slower :
ltree2text(subltree(myltree, pos-1,pos ));
>> Also a function returning the comon prefix between two ltrees would be
>> really useful.
>
> ltree lca(ltree,ltree,...) (up to 8 arguments)
> ltree lca(ltree[])
> Returns Lowest Common Ancestor (lca)
I know, too, but :
test=> SELECT lca( '1.2.3'::ltree, '1.2.4'::ltree );
lca
-----
1.2
(1 ligne)
test=> SELECT lca( '1.2.3'::ltree, '1.2'::ltree );
lca
-----
1
(1 ligne)
In the case of the 'longest common prefix' I'd need the second SELECT to
return the same as the first. This is to determine a 'parent' path that
includes a bunch of other paths, in that case, if the parent is part of
the original set, I get the parent's parent instead of what I want.
> Have you read README.ltree ?
Yes ! But I had missed nlevel() to my shame.
thanks !
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: lists@boutiquenumerique.com, oleg@sai.msu.su, teodor@sigaev.ru
Subject: Re: assorted problems with intarray and other GiST contribs.
In-Reply-To: <op.sszn3uk9th1vuj@localhost>
* 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