The "Copy" statement (and \copy for local access
COPY (
select * from (.........
) TO ' || '''' || filname || '''' || ' with csv header'
STeve
-----Original Message-----
From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Ferrell, Denise D CTR
NSWCDD,H11
Sent: Wednesday, February 17, 2016 11:49 AM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] Extracting data into .csv format
Using PostgreSQL 9.3 on Linux
I'm trying to extract data into a comma delimited format and not having much success...seems to act totally different
fromOracle. Does anyone have any suggestions?
Thank you in advance.
Denise
THIS MESSAGE (AND ALL ATTACHMENTS) IS INTENDED FOR THE USE OF THE PERSON OR ENTITY TO WHOM IT IS ADDRESSED AND MAY
CONTAININFORMATION THAT IS PRIVILEGED, CONFIDENTIAL AND EXEMPT FROM DISCLOSURE UNDER APPLICABLE LAW. If you are not the
intendedrecipient, your use of this message for any purpose is strictly prohibited. If you have received this
communicationin error, please delete the message without making any copies and notify the sender so that we may correct
ourrecords. Thank you.