This commit is contained in:
Alexander Navarro 2024-09-27 10:21:15 -03:00
parent cce6bb6f9b
commit 324d28ee6f
Signed by untrusted user who does not match committer: anavarro
GPG key ID: 6426043E9FA3E3B5
2 changed files with 16 additions and 0 deletions

16
notes/pqsl_export_csv.md Normal file
View file

@ -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
```