Re: [BUGS] 0x1A in control file on Windows - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: [BUGS] 0x1A in control file on Windows
Date
Msg-id 48DA4044.7030305@dunslane.net
Whole thread Raw
In response to Re: [BUGS] 0x1A in control file on Windows  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [BUGS] 0x1A in control file on Windows  (Magnus Hagander <magnus@hagander.net>)
List pgsql-hackers

Tom Lane wrote:
>> The point being that the config files are opened with AllocateFile(),
>> which in turn calls fopen(). It doesn't use open(). The proposal was
>> only to make all *open()* calls do it binary. I was under the impression
>> that on Unix, that's what open() did, so we should behave the same?
>>     
>
> That seems just weird.  I do not think there's any correlation between
> whether we use open or fopen and whether the file is text or binary.
> Even if it happens to be true right now, depending on it would be
> fragile.
>
>     
>   
I agree. If you really want something like that you should invent 
OpenConfigFile() or some such. But it hardly seems worth it.

cheers

andrew


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [BUGS] 0x1A in control file on Windows
Next
From: Aidan Van Dyk
Date:
Subject: Re: Proposal of SE-PostgreSQL patches (for CommitFest:Sep)