SV: 7.1 devel and initdb core dumps

From: "Jarmo Paavilainen" <netletter(at)comder(dot)com>
To: "PostgreSQL General" <pgsql-general(at)hub(dot)org>, "Tod McQuillin" <devin(at)spamcop(dot)net>
Subject: SV: 7.1 devel and initdb core dumps
Date: 2000-10-18 14:04:54
Message-ID: 005601c0390c$63d702c0$1501a8c0@theboss.comder.private
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


...
> > And then to something else, whats wrong with this:
> >
> > nstr = palloc(len = strlen(string) + 1);
> > memcpy(nstr, string, len);
>
> The first code you wrote doesn't do the the same thing as the second.

Well thats the point. Why do I need to allocate one extra space for the
string (the first one allready allocate space for the NULL). While the
second example allocates one char too much. Am I right or am I wrong. Or am
I going blind and stupid, at the same time.

// Jarmo

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Wade D. Oberpriller 2000-10-18 14:39:42 Arrays in PL/PGSQL
Previous Message Gunnar R|nning 2000-10-18 13:37:56 Re: Re: JDBC Performance