Psql
Aus SchnallIchNet
Version vom 2. Januar 2012, 09:58 Uhr von Cbs (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „== export to CSV-file == postgres >= 8.2 COPY (SELECT count(*) FROM pg_class) TO '/tmp/file.csv' CSV; other posible ways: SELECT * FROM table \g /tmp/testin…“)
export to CSV-file
postgres >= 8.2
COPY (SELECT count(*) FROM pg_class) TO '/tmp/file.csv' CSV;
other posible ways:
SELECT * FROM table \g /tmp/testing
or
\o /tmp/testing select * from table;