Re: beta6 pg_restore core dumps

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, Martin Renters <martin(at)datafax(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: beta6 pg_restore core dumps
Date: 2001-03-18 01:57:49
Message-ID: 20643.984880669@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Philip Warner <pjw(at)rhyme(dot)com(dot)au> writes:
> At 12:31 17/03/01 -0500, Tom Lane wrote:
>> This would be a lot simpler and cleaner if _PrintData() simply didn't
>> append a zero byte to the buffer contents. Philip, is it actually
>> necessary for it to do that?

> Strictly, I think the answer is that it is not necessary. The output of the
> uncompress may be a string, which could be passed to one of the str*
> functions by a downstream call. AFAICT, this is not the case, and the code
> should work without it, but it's probably safer in the long run to leave it
> there.

Considering that the data we are working with is binary, and may contain
nulls, any code that insisted on null-termination would probably be ipso
facto broken.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Warner 2001-03-18 02:04:18 Re: beta6 pg_restore core dumps
Previous Message Philip Warner 2001-03-18 01:46:36 Re: beta6 pg_restore core dumps