Re: [HACKERS] GiST opclass and varlena

2008-04-22 Thread Dimitri Fontaine
Hi all, The first version of prefix code is now released at pgfoundry, last bug squashed by Jordan, who did his own prefix gist opclass implementation before I did, but didn't publish at this time. The plan is to integrate is work into the prefix solution, as his lookups are faster than mine, a

Re: [HACKERS] GiST opclass and varlena

2008-04-10 Thread Dimitri Fontaine
Le jeudi 10 avril 2008, Gregory Stark a écrit : > I'm getting interested now. How was __pr_penalty defined? What was the > declaration you were missing in prefix.c? In fact __pr_penalty is the internal code called from both the SQL callable functions (and some other calling sites). The problem wa

Re: [HACKERS] GiST opclass and varlena

2008-04-10 Thread Gregory Stark
"Dimitri Fontaine" <[EMAIL PROTECTED]> writes: > It turned around the error was related to the definition of my gpr_penalty() > function, which I wanted to expose as the GiST "internal" and a SQL callable > one too (for debugging and tests purpose). I forgot to define the internal > one in the

Re: [HACKERS] GiST opclass and varlena

2008-04-10 Thread Dimitri Fontaine
I guess I'll keep talking to myself, but... Le mercredi 02 avril 2008, Dimitri Fontaine a écrit : > My previous tests were only done with REL8_2_STABLE cvs branch, I just > redone some tests with REL8_3_STABLE and got no error. The index is still > buggy, in the sense some requests returns differe

Re: [HACKERS] GiST opclass and varlena

2008-04-02 Thread Dimitri Fontaine
Le mardi 25 mars 2008, Dimitri Fontaine a écrit : > 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=

Re: [HACKERS] GiST opclass and varlena

2008-03-25 Thread Dimitri Fontaine
Le Tuesday 25 March 2008 17:57:11 Dragan Zubac, vous avez écrit : > and we're using a procedure to match prefices (longest prefix > match),with simething like: > > while tmp_length <= char_length(d_number) loop > > -- take the number and try to find it in prefix table > -- if not found,decrease it

Re: [HACKERS] GiST opclass and varlena

2008-03-25 Thread Dragan Zubac
Hello Not so familiar with all this math :) ,but here's my solution,which I must admit keep things going at the moment: db=> \d prefix Table "public.prefix" Column | Type | Modifiers --+-+--

[HACKERS] GiST opclass and varlena

2008-03-25 Thread Dimitri Fontaine
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