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

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Bruce Momjian - CVS <momjian(at)postgresql(dot)org>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql-server/ oc/src/sgml/ref/copy.sgml rc/bac ...
Date: 2003-04-20 01:52:20
Message-ID: 200304200152.h3K1qKN19870@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Neil Conway wrote:
> On Sat, 2003-04-19 at 15:55, Bruce Momjian - CVS wrote:
> > Add pipe parameter to COPY function to allow proper line termination.
> >
>
> <para>
> - Note that the end of each row is marked by a Unix-style newline
> - (<quote><literal>\n</></>). Presently, <command>COPY FROM</command> will not behave as
> - desired if given a file containing DOS- or Mac-style newlines.
> - This is expected to change in future releases.
> + <command>COPY TO</command> will terminate each row with a Unix-style
> + newline (<quote><literal>\n</></>), or carriage return/newline
> + ("\r\n") on MS Windows. <command>COPY FROM</command> can handle lines
> + ending with newlines, carriage returns, or carriage return/newlines.
> </para>
> </refsect2>
>
> You might want to clarify that it's the OS of the server (I assume) that
> determines the line endings used by COPY TO.

Yes, I did think of that. The issue is that COPY only outputs files on
to the server machine, so I figured it was clear, but you are right, it
is a good idea to make it clear in the docs.

COPY to STDOUT/STDIN will be controlled by the client end-of-line
because those files are opened in text mode by the client, I think.

Doc patch attached.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

Attachment Content-Type Size
unknown_filename text/plain 1.0 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian - CVS 2003-04-20 01:52:56 pgsql-server/doc/src/sgml/ref copy.sgml
Previous Message Neil Conway 2003-04-20 01:35:19 Re: pgsql-server/ oc/src/sgml/ref/copy.sgml rc/bac ...