Hi,

I'm trying to code a GiST opclass to index prefix searches (select ... from t 
where t.prefix @> query), now using a prefix_range datatype. This datatype is 
a varlena one, and storing it to disk and indexing it with BTrees work ok, 
but I'm failing to have my GiST opclass working, here's the problem:

postgres=# create index idx_prefix on ranges using gist(prefix 
gist_prefix_range_ops);
NOTICE:  gpr_picksplit(): entryvec->n= 234 maxoff= 232 l= 176 r=  56 l+r= 232 
unionL='01[0-7]' unionR='01[4-7]'
NOTICE:  gpr_picksplit(): v->spl_ldatum='01[0-7]' v->spl_rdatum='01[4-7]'
ERROR:  invalid memory alloc request size 3049878020

The code is available at pgfoundry here:
  http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/prefix/prefix/

The previous support for prefixes as text is still there (but will get 
deprecated soon --- or so I hope), and the new datatype and its usage not 
well commented nor documented currenlty. If this show up as a requirement to 
get your attention, please state it and I'll work on documenting prefix_range 
first.

I'm looking for some help on how to resolve the shown index creation problem, 
which I think is related to how I give data to GiST in its spl_ldatum and 
spl_rdatum from the user defined picksplit() method, lines 1101 and 1102 in 
prefix.c (version 1.26).

Regards,
-- 
dim

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to