Re: can't figure string compare result (using also custom C function) - Mailing list pgsql-general

From Sam Mason
Subject Re: can't figure string compare result (using also custom C function)
Date
Msg-id 20090213222327.GM32672@frubble.xen.chris-lamb.co.uk
Whole thread Raw
In response to can't figure string compare result (using also custom C function)  (Edoardo Panfili <edoardo@aspix.it>)
Responses Re: can't figure string compare result (using also custom C function)
List 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 by date:

Previous
From: Edoardo Panfili
Date:
Subject: can't figure string compare result (using also custom C function)
Next
From: Erik Jones
Date:
Subject: Re: 8.3 doc issue