assorted problems with intarray and other GiST contribs. - Mailing list pgsql-sql

From PFC
Subject assorted problems with intarray and other GiST contribs.
Date
Msg-id op.sszkzgnith1vuj@localhost
Whole thread Raw
In response to Re: Grouping Too Closely  ("Greg Sabino Mullane" <greg@turnstep.com>)
Responses Re: assorted problems with intarray and other GiST contribs.  (Oleg Bartunov <oleg@sai.msu.su>)
Re: assorted problems with intarray and other GiST contribs.  (PFC <lists@boutiquenumerique.com>)
Re: assorted problems with intarray and other GiST contribs.  (Michael Fuhr <mike@fuhr.org>)
List pgsql-sql
Hello !
I'm using postgresql 8.0.1-r2 on gentoo linux.So, here are the problems :
************************************* int_array_aggregate crashes

SELECT int_array_aggregate(id) FROM (SELECT id FROM shop.products LIMIT X)  
as foo;
This one works fine if X <= 512 and crashes postgres if X > 512.ie. if the aggregate accumulates more than 512 values
itcrashes.
 
On another example query :

SELECT int_array_aggregate(product_id),int_array_aggregate(category_id)FROM (SELECT * FROM shop.products_to_categories
LIMITN) as foo;
 
OK if N <= 8, crashes if N > 9
************************************* integer[] intersection is slow
int[] & int[]   - returns intersection of arrays
This is a useful function but it is very slow.Computing the intersection of two int[] of length 100 takes about 40
ms.inPython for instance, computing a similar intersection takes about 0.1  
 
millisecond, including building both arrays, converting them to sets, and  
computing the set intersection.Maybe some information can be extracted from the Python souce
code.*************************************ltree
 
First of all congratulations for this extremely useful datatype and  
assorted indexes, it really rocks and makes SQL tree handling from  
nightmare to fun.
It would be nice to have functions to :- know the length of a ltree (ie. number of elements)- access it like an array
(ie.get element N).This is to be able to iterate over the elements and fetch each of them to  
 
get the list of rows which make up a path upto a given object in my tree.
Also a function returning the comon prefix between two ltrees would be  
really useful.

Thanks and sorry to come bother you !Regards,PF Caillaud




pgsql-sql by date:

Previous
From: PFC
Date:
Subject: Re: people who buy A, also buy C, D, E
Next
From: Oleg Bartunov
Date:
Subject: Re: assorted problems with intarray and other GiST contribs.