Received: from sss.pgh.pa.us ([192.204.191.242]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g1B6KcE44877 for ; Mon, 11 Feb 2002 01:20:38 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id g1B6KUf02201; Mon, 11 Feb 2002 01:20:30 -0500 (EST) To: Bruce Momjian cc: Simone Tellini , pgsql-admin@postgresql.org Subject: Re: restore whoes In-reply-to: <200202110602.g1B62Tj07757@candle.pha.pa.us> References: <200202110602.g1B62Tj07757@candle.pha.pa.us> Comments: In-reply-to Bruce Momjian message dated "Mon, 11 Feb 2002 01:02:29 -0500" Date: Mon, 11 Feb 2002 01:20:30 -0500 Message-ID: <2198.1013408430@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200202/99 X-Sequence-Number: 3258 Bruce Momjian 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