pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PFC <lists@boutiquenumerique.com>
To: pgsql-sql@postgresql.org
Cc: teodor@sigaev.ru
Cc: oleg@sai.msu.su
Subject: assorted problems with intarray and other GiST contribs.
Date: Sun, 26 Jun 2005 18:48:42 +0200
Message-ID: <op.sszkzgnith1vuj@localhost> (raw)
In-Reply-To: <a053b85772b71eaf158e0354551e72d2@biglumber.com>
References: <a053b85772b71eaf158e0354551e72d2@biglumber.com>


	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 it crashes.

	On another example query :

SELECT int_array_aggregate(product_id),
	int_array_aggregate(category_id)
 FROM (SELECT * FROM shop.products_to_categories LIMIT N) 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.
	in Python 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





view thread (4+ messages)  latest in thread

Message-ID: <op.sszkzgnith1vuj@localhost>
Permalink:  ../op.sszkzgnith1vuj@localhost/
Also on:    postgresql.org/message-id/op.sszkzgnith1vuj@localhost

 · 

reply

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, teodor@sigaev.ru, oleg@sai.msu.su
  Subject: Re: assorted problems with intarray and other GiST contribs.
  In-Reply-To: <op.sszkzgnith1vuj@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