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

From Steve Atkins
Subject Re: CSV mode option for pg_dump
Date
Msg-id DD5C517A-A261-4EB7-8F74-7CB72766D1E5@blighty.com
Whole thread Raw
In response to Re: CSV mode option for pg_dump  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: CSV mode option for pg_dump  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: CSV mode option for pg_dump  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On Jun 13, 2006, at 7:34 AM, Martijn van Oosterhout wrote:
>
> What this tells me is that we need a tool somewhere between psql and
> pg_dump, say, pgquery. It's sole purpose in life is to generate output
> from various queries. Because it's a seperate tool there's no question
> of psql or pg_dump being able to parse them.
>
> While you're at it, you could add modules to support many different
> output styles, like CSV, XML, Excel format, HTML, etc.
>
> This I beleive would take the load off psql to provide many different
> output styles, as well as the load off pg_dump to produce
> parsable-by-third-party output.
>
> Thoughts?

Perl+DBD::Pg+CPAN does almost all of this already. Lots of support
for countless different output formats, and mostly fairly well battle- 
tested.

I suspect that a perl script to do all that would be dominated by  
commandline
option parsing, as all the hard work is in existing modules.

Would that be adequate, or do we really want to reimplement and  
maintain all
the output format complexity in our own code, in C?

Cheers,  Steve


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: timezones to own config file
Next
From: "Joshua D. Drake"
Date:
Subject: Re: CSV mode option for pg_dump