diff --git a/.zk/notebook.db b/.zk/notebook.db index 3429afe..9a7f4f7 100644 Binary files a/.zk/notebook.db and b/.zk/notebook.db differ diff --git a/notes/pqsl_export_csv.md b/notes/pqsl_export_csv.md new file mode 100644 index 0000000..c065201 --- /dev/null +++ b/notes/pqsl_export_csv.md @@ -0,0 +1,16 @@ +--- +title: "Postgres: Export a query to CSV on the client side" +tags: postgres +created: 2024-09-27 09:20 +--- + +# Postgres: Export a query to CSV on the client side + +Execute the follow sentence in an **interactive session** of psql: + +```sql +\copy ( + Select * From foo +) TO '/tmp/test.csv' WITH CSV DELIMITER ';' HEADER +``` +