SSTS Blog

Some news and tidbits that we share

How to extract Postgres tables to csv files

by SSTS
SSTS
Server Side Technology Solutions is a consulting firm that specializes in databa
User is currently offline
on Jun 18 in Blog 0 Comments

The Postgres COPY command can be run within psql to extract csv files for exchange to an external system. You supply

a file location, delimiter, and format.

Here's an example:

COPY products_273 TO '/tmp/products_199.csv' DELIMITER ',' CSV HEADER;

Tags: Untagged
Hits: 2214

About the author

SSTS

Server Side Technology Solutions is a consulting firm that specializes in database design, development and support.

Comments

Please login first in order for you to submit comments