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
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org