Re: can't figure string compare result (using also custom C function)

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: can't figure string compare result (using also custom C function)
Дата
Msg-id 20090213222327.GM32672@frubble.xen.chris-lamb.co.uk
обсуждение исходный текст
Ответ на can't figure string compare result (using also custom C function)  (Edoardo Panfili <edoardo@aspix.it>)
Ответы Re: can't figure string compare result (using also custom C function)  (Edoardo Panfili <edoardo@aspix.it>)
Список pgsql-general
On Fri, Feb 13, 2009 at 10:31:49PM +0100, Edoardo Panfili wrote:
> The problem arises only with particular records, when the first
> character of the string is generated by my function [1].
> When the first character is copied from postgres parameter [2] all works
> fine.
>
> [1] buffer[0]='X'; buffer[1]=' ';
> [2] memcpy(buffer,VARDATA(part),VARSIZE(part)-VARHDRSZ)

I'm not much of an expert with extending PG in C; but my first
suggestion would be are you null terminating the string?

If you are, could you include a (cut down) portion of the code that
demonstrates the problem?

--
  Sam  http://samason.me.uk/

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

Предыдущее
От: Edoardo Panfili
Дата:
Сообщение: can't figure string compare result (using also custom C function)
Следующее
От: Erik Jones
Дата:
Сообщение: Re: 8.3 doc issue