On Wed, Jun 14, 2006 at 10:55:04AM -0400, Bruce Momjian wrote:
> > Once again: give me a plausible use-case for pulling this data out of a
> > pg_dump output file.  You'd need data-massaging code anyway just to
> > extract the data, so why not expect that code to convert to CSV or
> > whatever other format you might want?  If you can think of use-cases like
> > this, why do you think the destination format is necessarily CSV and not
> > something else?  If it is something else, adding a CSV option to pg_dump
> > makes it *harder* not easier to write that massaging code, because now
> > it's got to cope with N dump formats not one.
> 
> I don't have to think of a use case.  I trusted the people who said we
> needed CSV, so I trust them again if they say doing pg_dump with CSV
> would be a good idea.

I think the point is that it's hard to imagine a use case for CSV
support in pg_dump that isn't already better served by using psql. If
you add it to pg_dump, people have to write special code to extract it
anyway, so why can't they handle the tab delimited themselves.

OTOH, if you use psql you get straightforward CSV wit no garbage at
the beginning or end, just straight, raw, CSV.

$ psql postgres -c '\copy pg_namespace to stdout csv'
pg_toast,10,
pg_temp_1,10,
pg_catalog,10,"{kleptog=UC/kleptog,=U/kleptog}"
public,10,"{kleptog=UC/kleptog,=UC/kleptog}"
information_schema,10,"{kleptog=UC/kleptog,=U/kleptog}"

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to 
> litigate.

Attachment: signature.asc
Description: Digital signature

Reply via email to