update
This commit is contained in:
parent
cce6bb6f9b
commit
324d28ee6f
2 changed files with 16 additions and 0 deletions
BIN
.zk/notebook.db
BIN
.zk/notebook.db
Binary file not shown.
16
notes/pqsl_export_csv.md
Normal file
16
notes/pqsl_export_csv.md
Normal 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
|
||||||
|
```
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue