Received: from candle.pha.pa.us (216-55-132-35.dsl.san-diego.abac.net [216.55.132.35]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g1BK03E09725 for ; Mon, 11 Feb 2002 15:00:04 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id g1BJxqH07105; Mon, 11 Feb 2002 14:59:52 -0500 (EST) From: Bruce Momjian Message-Id: <200202111959.g1BJxqH07105@candle.pha.pa.us> Subject: Re: restore whoes In-Reply-To: <12608.1013455458@sss.pgh.pa.us> To: Tom Lane Date: Mon, 11 Feb 2002 14:59:52 -0500 (EST) CC: Simone Tellini , pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL96 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200202/131 X-Sequence-Number: 3289 Tom Lane wrote: > Bruce Momjian writes: > > Well, if the COPY fails on the last value of the first row, and that > > value has a trailing \r, we can be pretty sure. > > In the examples given, the error didn't show up till later rows, in > fields where there was no \r anywhere. Hard to imagine why a failure would occur on anything but the first row. The original poster had \.0, which was some other issue. I don't remember seeing those examples. > > I don't see how your > > solution make it fool-proof, except by requiring every COPY file, old > > and new, and created, to have CR as \r. > > There *is no* foolproof solution with the current data representation > (and your idea of throwing untrustworthy error messages is certainly not > foolproof). What we need to do is migrate to a new data representation. > Fortunately, it's nearly there already, since \ r and \ n sequences are > already supported by COPY IN. We clearly should be outputting \r and \n from COPY by default. Input is the issue. We are foolproof it people don't munge there original files. The question is how many people are munging them vs. how many people are creating COPY files on their own (and need to add mapping for \r), or have COPY files from older versions of PostgreSQL. I think the latter group is much larger. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026