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/