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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>
Cc: pgsql-hackers(at)postgresql(dot)org, pgsql-bugs(at)postgresql(dot)org
Subject: Re: [HACKERS] 0x1A in control file on Windows
Date: 2008-09-18 04:48:34
Message-ID: 8735.1221713314@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp> writes:
> I found a bug that pg_controldata ends with error if control files
> contain 0x1A (Ctrl+Z) on Windows.

> We probably need to add PG_BINARY when we open control files
> because 0x1A is an end-of-file marker on Windows.

Well, why is that a bug? If the platform is so silly as to define text
files that way, who are we to argue?

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message ITAGAKI Takahiro 2008-09-18 06:57:55 Re: [HACKERS] 0x1A in control file on Windows
Previous Message ITAGAKI Takahiro 2008-09-18 02:32:31 0x1A in control file on Windows

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2008-09-18 06:23:08 Re: optimizing CleanupTempFiles
Previous Message Tom Lane 2008-09-18 04:42:42 Re: optimizing CleanupTempFiles