Re: Patch for COPY command

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Kevin Chase" <kevincha99(at)hotmail(dot)com>
Cc: dpage(at)vale-housing(dot)co(dot)uk, pgsql-cygwin(at)postgresql(dot)org
Subject: Re: Patch for COPY command
Date: 2002-02-13 19:15:15
Message-ID: 29952.1013627715@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-cygwin

"Kevin Chase" <kevincha99(at)hotmail(dot)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

In response to

Browse pgsql-cygwin by date

  From Date Subject
Next Message Burak Gürsoy 2002-02-13 21:40:42 create cluster (windows 98)
Previous Message Van Vo 2002-02-13 17:20:12 Re: win2k: newbie getting error 'database creation failed'