Re: beta6 pg_restore core dumps - Mailing list pgsql-hackers

From Philip Warner
Subject Re: beta6 pg_restore core dumps
Date
Msg-id 3.0.5.32.20010318130418.02adb750@mail.rhyme.com.au
Whole thread Raw
In response to Re: beta6 pg_restore core dumps  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
At 20:57 17/03/01 -0500, Tom Lane wrote:
>Philip Warner <pjw@rhyme.com.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.

But we're not; this is the same code that sends the COPY output back to PG.


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


pgsql-hackers by date:

Previous
From: Philip Warner
Date:
Subject: Re: beta6 pg_restore core dumps
Next
From: Tom Lane
Date:
Subject: Re: Stuck spins in current