pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Simone Tellini <tellini@areabusiness.it>
Cc: pgsql-admin@postgresql.org
Subject: Re: restore whoes
Date: Mon, 11 Feb 2002 01:20:30 -0500
Message-ID: <2198.1013408430@sss.pgh.pa.us> (raw)
In-Reply-To: <200202110602.g1B62Tj07757@candle.pha.pa.us>
References: <200202110602.g1B62Tj07757@candle.pha.pa.us>

Bruce Momjian <pgman@candle.pha.pa.us> writes:
> I was thinking of throwing a specific error when copy fails _and_ when
> the line ends with a \r, rather than a generic COPY failure message ---
> not sure how to do that, though.

Doesn't seem practical, as the actual error may not occur till much
later, far away from the COPY code itself.

> I don't think I like the carriage-return -> \r solution anymore because
> that would require people creating COPY files by hand, which I am sure
> many do, to also escape carriage returns, which seems too MS-ish for me.

We have to change *something*, Bruce, because as things stand it's
completely ambiguous whether a \r is a legitimate data character or
something introduced by a newline conversion.  If you insist on 100%
backwards compatibility then we'll be fighting this problem forever.
(Or at least till Windows dies ... yeah right.)

Please note also that \ r (two characters) is *already* accepted as
meaning a carriage return.  Ditto \ 0 1 5.  So it's quite possible
that applications generating COPY data may be using one of these
representations and not be affected in the slightest.

			regards, tom lane



view thread (30+ messages)  latest in thread

Message-ID: <2198.1013408430@sss.pgh.pa.us>
Permalink:  ../2198.1013408430@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2198.1013408430@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pgman@candle.pha.pa.us, tellini@areabusiness.it
  Subject: Re: restore whoes
  In-Reply-To: <2198.1013408430@sss.pgh.pa.us>
  References: <200202110602.g1B62Tj07757@candle.pha.pa.us> <2198.1013408430@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox