Re: CSV mode option for pg_dump - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: CSV mode option for pg_dump
Date
Msg-id 448DAF5F.2030007@dunslane.net
Whole thread Raw
In response to Re: CSV mode option for pg_dump  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: CSV mode option for pg_dump  ("Jim C. Nasby" <jnasby@pervasive.com>)
Re: CSV mode option for pg_dump  ("Bill Bartlett" <bbartlett@softwareanalytics.com>)
List pgsql-hackers
Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>   
>> Something someone said on IRC just now triggered a little memory  ... I 
>> think we should provide an option to have pg_dump work in CSV mode 
>> rather than text mode. This probably doesn't have much importance in the 
>> case of text dumps, but in custom or tar dumps where you might want to 
>> get at individual data members, having an option for CSVs that you want 
>> to load into some other product might be nice.
>>     
>
> This is silly.  You'd just COPY the particular table you want, not use
> pg_dump.  pg_dump's already got an unreasonably large number of options
> without adding ones that have essentially zero use.  Also, I think there
> are sufficient grounds to worry about whether a CSV dump would always
> reload correctly --- we already know that that's a poorly thought out
> "standard".
>
>     
>   

Well, if you have dozens or hundreds of tables it might well be more 
convenient.

As for not reloading - I went to some trouble to make sure that we could 
reload what we dumped, exactly, unless the force options are used. I 
might have made a bug in that, but it isn't dependent on the particular 
CSV format used.

Naturally you won't have a use for it, but I suspect others might (in 
which case they had better speak up ;-) )

I suppose the alternative would be to write a little tool in perl or 
whatever to do the same thing for you. Maybe a good pgfoundry project.

cheers

andrew



pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: CSV mode option for pg_dump
Next
From: Tom Lane
Date:
Subject: Re: TODO: Add pg_get_acldef(), pg_get_typedefault(),