Exporting data from PostgreSQL - Mailing list pgsql-novice

From Michael Glaesemann
Subject Exporting data from PostgreSQL
Date
Msg-id 32F21FF6-9D67-11D7-B593-0005029FC1A7@myrealbox.com
Whole thread Raw
Responses Re: Exporting data from PostgreSQL
Re: Exporting data from PostgreSQL
List pgsql-novice
Hello!

I've been enjoying getting to know PostgreSQL and am happy that my
queries seem to be working well. I've also been getting along in PHP
and have been able to impress my boss (always a good thing!) with an
easy way for her to manage some of her data using just a browser.

Browsers are great, but sometimes you need hard copy, and often
something other than printing the browser window. So I'd like to be
able to get query results out of PostgreSQL somehow, hopefully in a
tab-delimited file.

I'm sure this is something pretty easy and I just haven't hit upon it.
I've googled and come across EMS' PostgreSQL Export. Sounds like a
great product, but I'm on a Mac, am not sure what's involved with using
the Linux version on OS X and am not too keen on trying, and I don't
think I need something so fancy. This is probably a pretty common task,
so there must be a way to do it, I'd think

Things I've thought of:
COPY: Only works with tables, not views (from what I've read). Seems
like a bit of a hassle to create a short-lived table to select into
just to get some data out, but maybe that's what I should do.
PHP (or other language): Make a script that'll do this for me. Can be
used with query results.

I'm probably missing something. I'd love to hear any ideas, including
finding out if I'm just too lazy to use the two I've already thought
of! :)

Thanks any advice!

Michael Glaesemann
grzm myrealbox com


pgsql-novice by date:

Previous
From: "M. Bastin"
Date:
Subject: Re: Multibyte support and accented characters
Next
From: Michael Glaesemann
Date:
Subject: Re: Multibyte support and accented characters