Re: C function to create tsquery not working

Поиск
Список
Период
Сортировка
От Ivan Sergio Borgonovo
Тема Re: C function to create tsquery not working
Дата
Msg-id 20100225113039.53fa661e@dawn.webthatworks.it
обсуждение исходный текст
Ответ на C function to create tsquery not working  (Ivan Sergio Borgonovo <mail@webthatworks.it>)
Ответы Re: C function to create tsquery not working  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-general
On Thu, 11 Feb 2010 20:11:54 +0100
Ivan Sergio Borgonovo <mail@webthatworks.it> wrote:

> I'm still having trouble making this work:
>
> http://pgsql.privatepaste.com/14a6d3075e

I tried to play with
item->operator.left
to see if reshuffling the expression could make any difference.
item->operator.left = 2 * lexeme - 2 (1 + i)
or
item->operator.left = lexemes

But the result seems pretty indifferent to what I put in
operator.left.
That makes me think the error is here.

But I still get those 2 kind of error:
ERROR:  unrecognized operator type: 50 (first run)
or
ERROR:  stack depth limit exceeded

Just at the 3rd returned row, just for certain queries (see previous
email).

It doesn't look as if I palloced too few memory, I tried to allocate
3x the memory I estimated and I still get the errors.

The function is actually returning correct results, so it seems the
tsquery object is well formed.

But still it looks like infix() is trying to read more operators
than the one I thought I've put in... but just for certain queries,
and just at the 3rd row returned.

Should I use something different than palloc? Should I return the
query differently? Am I supposed to free something?


--
Ivan Sergio Borgonovo
http://www.webthatworks.it


В списке pgsql-general по дате отправления:

Предыдущее
От: "A. Kretschmer"
Дата:
Сообщение: Re: Global Temp Table
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: C function to create tsquery not working