Skip to content

Commit 6ff7dad

Browse files
committed
Merge pull request jbranchaud#9 from bhargavrpatel/bhargavrpatel-patch-1
Add \copy command
2 parents 1ffec14 + f53eb76 commit 6ff7dad

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

postgres/export-query-results-to-a-csv.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,10 @@ keyword:
2828
copy (select * from pokemons) to '/tmp/pokemon_dump.csv' csv header;
2929
```
3030

31+
If your user has limited access, you can use the \copy command like so:
32+
33+
```sql
34+
\copy (select * from pokemons) to '/tmp/pokemon_dump.csv' with csv header;
35+
```
36+
3137
[source](http://stackoverflow.com/questions/1120109/export-postgres-table-to-csv-file-with-headings)

0 commit comments

Comments
 (0)