Re: Patch for COPY command - Mailing list pgsql-cygwin

From Tom Lane
Subject Re: Patch for COPY command
Date
Msg-id 29952.1013627715@sss.pgh.pa.us
Whole thread Raw
In response to Re: Patch for COPY command  ("Kevin Chase" <kevincha99@hotmail.com>)
List pgsql-cygwin
"Kevin Chase" <kevincha99@hotmail.com> writes:
> That discussion may be orthogonal to my peeve, namely the failure of
> postgresql to output/input text in textmode so that the mount default for
> line endings is observed.  However, if the input file is on a textmode
> mount, my patch will allow either \r\n or \n endings, which might be the
> source of many of the problems.  Won't do any good for \r endings though.

If we select text mode I/O on Windows, it will in fact *break* COPY's
current handling of \r and \n embedded in data.  Because of that, I do
not believe that your patch is acceptable now.

It'd be possible and perhaps reasonable to use text mode after we make
the changes currently being discussed in the pghackers thread.  Once
that happens, exactly which representation is used for newlines will be
irrelevant, so we could allow libc to translate newlines to the local
convention, which is essentially what you're asking for.

            regards, tom lane

pgsql-cygwin by date:

Previous
From: "Van Vo"
Date:
Subject: Re: win2k: newbie getting error 'database creation failed'
Next
From: Burak Gürsoy
Date:
Subject: create cluster (windows 98)