Skip site navigation (1) Skip section navigation (2)

Re: Connection Broken with Custom Dicts for TSearch2

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Rodrigo Hjort <rodrigo(dot)hjort(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Connection Broken with Custom Dicts for TSearch2
Date: 2006-06-05 15:12:43
Message-ID: 448449EB.2080502@sigaev.ru (view raw or flat)
Thread:
Lists: pgsql-hackers
Sorry, it isn't mentioned on page, but this example of code working only with 
before 8.1 versions. In 8.1 interface to dictionary was changed.

More precisely, in 8.1, lexize function (in num2english dlexize_num2english()) 
should return pointer to TSLexeme array instead of char**.

Rodrigo Hjort wrote:
> Sorry, but I thought it that was the most appropriate list for the issue.
> 
> I was following these instructions:
> http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/docs/custom-dict.html 
> <http://www.sai.msu.su/~megera/postgres/gist/tsearch/V2/docs/custom-dict.html>
> 
> And what happens is that the function works just once. Perhaps a 
> malloc/free issue?
> 
> 
> $ psql fuzzy
> 
> fuzzy=# select to_tsvector('the quick brown fox jumped over the lazy dog 
> 100');
>                             to_tsvector
> --------------------------------------------------------------------
>  'dog':9 'fox':4 'jump':5 'lazi':8 'brown':3 'quick':2 'hundred':10
> (1 registro)
> 
> fuzzy=# select to_tsvector('the quick brown fox jumped over the lazy dog 
> 100');
> server closed the connection unexpectedly
>         This probably means the server terminated abnormally
>         before or while processing the request.
> A conex√£o com servidor foi perdida. Tentando reiniciar: Falhou.
> !> \q
> 
> 
> Regards,
> 
> Rodrigo Hjort
> http://icewall.org/~hjort
> 

-- 
Teodor Sigaev                                   E-mail: teodor(at)sigaev(dot)ru
                                                    WWW: http://www.sigaev.ru/

In response to

Responses

pgsql-hackers by date

Next:From: Jim C. NasbyDate: 2006-06-05 15:22:59
Subject: Re: [PERFORM] psql -A (unaligned format) eats too much memory
Previous:From: Andrew DunstanDate: 2006-06-05 14:16:42
Subject: Re: 'CVS-Unknown' buildfarm failures?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group