| From: | Masterprojekt Naumann1 <mpws2013n1(at)gmail(dot)com> |
|---|---|
| To: | Thomas Fanghaenel <tfanghaenel(at)salesforce(dot)com> |
| Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Convert Datum* to char* |
| Date: | 2014-01-06 15:49:59 |
| Message-ID: | CANjJybTR7-h=rg2m9B-9HSJ-_nqYueC+Suo0sBCaa+T_YLyR5Q@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
2014/1/6 Thomas Fanghaenel <tfanghaenel(at)salesforce(dot)com>
> On Mon, Jan 6, 2014 at 8:09 AM, Masterprojekt Naumann1
> <mpws2013n1(at)gmail(dot)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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2014-01-06 15:53:06 | Re: dynamic shared memory and locks |
| Previous Message | Andres Freund | 2014-01-06 15:36:32 | Re: generic pseudotype IO functions? |