Tom,
> Can anybody point me in the right direction for writing rows of data to a
> file. I know how to put stuff into a database from file but not how to get
> stuff out.
From psql:
\o file_name
SELECT whatever FROM some_table;
\o
See the documentatin on PSQL for more instructions. Or type \? at the psql
prompt.
-Josh Berkus