Re: pgsql-server/ oc/src/sgml/ref/copy.sgml rc/bac ...

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Neil Conway <neilc(at)samurai(dot)com>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql-server/ oc/src/sgml/ref/copy.sgml rc/bac ...
Date: 2003-04-21 15:35:42
Message-ID: 29667.1050939342@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Tom Lane wrote:
>> suggest that you're thinking that way. What exactly do you have in
>> mind here? Certainly the client is not going to determine the
>> newline format for COPY TO STDOUT unless it does translation.

> My idea was that if the client opens a file to dump the STDOUT data, it
> will opened in text mode, and that will have \r\n for Win32 and \n for
> Unix.

But it would probably be a bad idea for the client to open such a file
in text mode. We are going to have COPY BINARY TO STDOUT/FROM STDIN
real soon now (like probably today or tomorrow ;-)). Unless the client
takes the trouble to determine whether the copy is text or binary,
opening the file in text mode will be the Wrong Thing. So I think that
a decision to always send LF on-the-wire will result in Windows users
seeing LF-newline dump files. Not sure how unhappy that will make them.

I personally don't have a problem with the approach; I was just
wondering if it really does what you intend.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2003-04-21 15:44:03 Re: pgsql-server/ oc/src/sgml/ref/copy.sgml rc/bac ...
Previous Message Tom Lane 2003-04-21 15:20:02 pgsql-server/src/backend/commands Tag: REL7_3_ ...