Re: COPY formatting - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: COPY formatting
Date
Msg-id 200403181652.i2IGqLH18195@candle.pha.pa.us
Whole thread Raw
In response to Re: COPY formatting  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
> > Lee Kindness wrote:
> >> To be honest this idea strikes me as overkill - over
> >> engineering.
> >> 
> > I agree. My modest proposal for handling CSVs would be to extend the 
> > DELIMITER parameter to allow up to 3 characters - separator, quote and 
> > escape. Escape would default to the quote char and the quote char would 
> > default to unspecified.
> 
> I could go with that too.  The question here is do we have any popular
> use-cases that aren't solved by that extension, but could be solved by
> simple user-level data formatting functions?  I'm not real eager to add
> such a feature as an "if we build it they will come" speculation, but
> if anyone can point to solid use-cases besides handling CSV, then it
> probably is worth doing.

The thing I liked about Andrew's idea is that it even covers escape
quoting for CVS, which might change from implementation to implentation,
and it is flexible without requiring C coding.

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


pgsql-hackers by date:

Previous
From: Richard Huxton
Date:
Subject: Re: Further thoughts about warning for costly FK checks
Next
From: Jon Jensen
Date:
Subject: Re: Further thoughts about warning for costly FK checks