From: | "Bill Bartlett" <bbartlett(at)softwareanalytics(dot)com> |
---|---|
To: | "'Rod Taylor'" <pg(at)rbt(dot)ca> |
Cc: | "'Joshua D(dot) Drake'" <jd(at)commandprompt(dot)com>, "'Andrew Dunstan'" <andrew(at)dunslane(dot)net>, "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "'PG Hackers'" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: CSV mode option for pg_dump |
Date: | 2006-06-13 16:51:22 |
Message-ID: | 0fd501c68f09bc75f500fd501c68f09$9bc75f50$1e00a8c0@bartletthome.come00a8c0@bartletthome.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> From: Rod Taylor [mailto:pg(at)rbt(dot)ca]
> Sent: Tuesday, June 13, 2006 11:31 AM
>
>
> On Mon, 2006-06-12 at 16:28 -0400, Bill Bartlett wrote:
> > Can't -- the main production database is over at a CoLo site with
> > access only available via SSH, and tightly-restricted SSH at that.
> > Generally one of the developers will SSH over to the
> server, pull out
> > whatever data is needed into a text file via psql or
> pg_dump, scp the
> > file(s) back here and send them to the user.
>
> I don't get it. If you can use psql then you already have csv support.
>
> psql -c 'COPY pg_class TO STDOUT WITH CSV' postgres > pg_class.csv
Ah - RTF-UPDATED-M on my part. Most of my systems are still in PG 7.4.x
databases so I tend to stick with the 7.x docs, and I didn't notice the
"WITH CSV" option added in 8.0. That, plus temp tables, will be very
useful.
However, I also agree with the need for a new "pg_query / pg_export"
program. A program geared solely towards exporting the results of a
query would allow many of the options that are needed for the
ever-growing variety of output formats (XML, CSV, HTML, XHTML, etc.) and
details for each format without needing to clutter up pg_dump with
things that really having nothing to do with backing up and restoring
data. It could also allow a large range of options related to getting
data out (where, order by), many of which have also been discussed for
pg_dump recently.
- Bill
>
> > > -----Original Message-----
> > > From: Joshua D. Drake [mailto:jd(at)commandprompt(dot)com]
> > > Sent: Monday, June 12, 2006 4:15 PM
> > > To: Bill Bartlett
> > > Cc: 'Andrew Dunstan'; 'Tom Lane'; 'PG Hackers'
> > > Subject: Re: [HACKERS] CSV mode option for pg_dump
> > >
> > >
> > > Bill Bartlett wrote:
> > > > Here's me speaking up -- I'd definitely use it! As a
> > > quick way to pull
> > > > data into Excel to do basic reports or analysis, a CSV
> > > format would be
> > > > great.
> > >
> > > Why not just use ODBC?
> > >
> > > Joshua D. Drake
> > > --
> > >
> > > === The PostgreSQL Company: Command Prompt, Inc. ===
> > > Sales/Support: +1.503.667.4564 || 24x7/Emergency:
> > > +1.800.492.2240
> > > Providing the most comprehensive PostgreSQL solutions
> > > since 1997
> > > http://www.commandprompt.com/
> > >
> > >
> --
>
From | Date | Subject | |
---|---|---|---|
Next Message | Merlin Moncure | 2006-06-13 16:51:57 | Re: Fabian Pascal and RDBMS deficiencies in fully implementing |
Previous Message | Joshua D. Drake | 2006-06-13 16:47:36 | Re: CSV mode option for pg_dump |