Re: assorted problems with intarray and other GiST contribs.
От | PFC |
---|---|
Тема | Re: assorted problems with intarray and other GiST contribs. |
Дата | |
Msg-id | op.sszn3uk9th1vuj@localhost обсуждение исходный текст |
Ответ на | assorted problems with intarray and other GiST contribs. (PFC <lists@boutiquenumerique.com>) |
Список | pgsql-sql |
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 !
В списке pgsql-sql по дате отправления: