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

From Tom Lane
Subject Re: pgsql-server/ oc/src/sgml/ref/copy.sgml rc/bac ...
Date
Msg-id 29667.1050939342@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql-server/ oc/src/sgml/ref/copy.sgml rc/bac ...  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: pgsql-server/ oc/src/sgml/ref/copy.sgml rc/bac ...  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-committers
Bruce Momjian <pgman@candle.pha.pa.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


pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql-server/src/backend/commands Tag: REL7_3_ ...
Next
From: Bruce Momjian
Date:
Subject: Re: pgsql-server/ oc/src/sgml/ref/copy.sgml rc/bac ...