SV: 7.1 devel and initdb core dumps

Поиск
Список
Период
Сортировка
От Jarmo Paavilainen
Тема SV: 7.1 devel and initdb core dumps
Дата
Msg-id 005601c0390c$63d702c0$1501a8c0@theboss.comder.private
обсуждение исходный текст
Ответы too many clients?  ("chris markiewicz" <cmarkiew@commnav.com>)
Re: SV: 7.1 devel and initdb core dumps  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Gunnar R|nning
Дата:
Сообщение: Re: Re: JDBC Performance
Следующее
От: oberpwd@anubis.network.com (Wade D. Oberpriller)
Дата:
Сообщение: Arrays in PL/PGSQL