Re: user defined type

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kjetil Haaland <kjetil(dot)haaland(at)student(dot)uib(dot)no>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: user defined type
Date: 2004-11-19 16:20:14
Message-ID: 28783.1100881214@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Kjetil Haaland <kjetil(dot)haaland(at)student(dot)uib(dot)no> writes:
> first = palloc(sizeof(char)*secondStart);
> elog(NOTICE, "2:first=%s", first);
> elog(NOTICE, "strlen(first)=%d", strlen(first));

This is bogus because you've only allocated space, not filled it with
anything. It will contain whatever that RAM was last used for.

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Brad Rhine 2004-11-19 16:35:10 PGSQL Config
Previous Message Kjetil Haaland 2004-11-19 16:07:34 Re: user defined type