0

When I try to run the following command:

my_db> \copy \dt *. to /home/john/list.txt

I get an error:

\copy: parse error at "*"

Why? How can I save the output to disk?

2

Use the \o command as documented in the manual:

http://www.postgresql.org/docs/current/static/app-psql.html

specifically:

> \o <path_to_the_file_where_you_want_the_output>
> [your command]
> \o 

the last statement switches the output of psql back to stdout.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.