1

I want to copy table from postgis database to the PC hard drive (format can be .txt .xls .csv or whatever). How it can be done?

1 Answer 1

1

Use the SQL COPY command to write to the file system of the database server.

COPY tbl TO '/path/to/file/tbl.sql';

There are lots of options to adapt the output format.

Have a look at the \copy meta-command of psql if you need to copy from a remote server to the local disk.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.