Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] 0x1A in control file on Windows

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, Bruce Momjian <bruce(at)momjian(dot)us>, ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org, pgsql-bugs(at)postgresql(dot)org
Subject: Re: [HACKERS] 0x1A in control file on Windows
Date: 2008-09-24 13:27:32
Message-ID: 48DA4044.7030305@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-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

In response to

Responses

pgsql-hackers by date

Next:From: Aidan Van DykDate: 2008-09-24 13:29:22
Subject: Re: Proposal of SE-PostgreSQL patches (for CommitFest:Sep)
Previous:From: Tom LaneDate: 2008-09-24 13:18:13
Subject: Re: [HACKERS] 0x1A in control file on Windows

pgsql-bugs by date

Next:From: Magnus HaganderDate: 2008-09-24 13:35:33
Subject: Re: [HACKERS] 0x1A in control file on Windows
Previous:From: Tom LaneDate: 2008-09-24 13:18:13
Subject: Re: [HACKERS] 0x1A in control file on Windows

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group