Re: Convert Datum* to char* - Mailing list pgsql-hackers

From Masterprojekt Naumann1
Subject Re: Convert Datum* to char*
Date
Msg-id CANjJybTR7-h=rg2m9B-9HSJ-_nqYueC+Suo0sBCaa+T_YLyR5Q@mail.gmail.com
Whole thread
In response to Re: Convert Datum* to char*  (Thomas Fanghaenel <tfanghaenel@salesforce.com>)
Responses Re: Convert Datum* to char*
List pgsql-hackers
2014/1/6 Thomas Fanghaenel <tfanghaenel@salesforce.com>
On Mon, Jan 6, 2014 at 8:09 AM, Masterprojekt Naumann1
<mpws2013n1@gmail.com> wrote:
> Why is the memory of the variable uninitialized?

Are you checking that "i <= slot->tts_nvalid" before accessing the
tts_values and tts_isnull arrays?


Thanks for your ideas! I could fix the segmentation fault. I have to check both, slot->tts_isnull and 0 == slot->tts_values[i]. If both are false, I can convert the value with the method TextDatumGetCString(...).
Nevertheless, slot->tts_nvalid is always 0. I hope that there is no other problem.

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: generic pseudotype IO functions?
Next
From: Robert Haas
Date:
Subject: Re: dynamic shared memory and locks