SV: 7.1 devel and initdb core dumps - Mailing list pgsql-general

From Jarmo Paavilainen
Subject SV: 7.1 devel and initdb core dumps
Date
Msg-id 005601c0390c$63d702c0$1501a8c0@theboss.comder.private
Whole thread Raw
Responses too many clients?  ("chris markiewicz" <cmarkiew@commnav.com>)
Re: SV: 7.1 devel and initdb core dumps  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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


pgsql-general by date:

Previous
From: Gunnar R|nning
Date:
Subject: Re: Re: JDBC Performance
Next
From: oberpwd@anubis.network.com (Wade D. Oberpriller)
Date:
Subject: Arrays in PL/PGSQL