1

I have tried on terminal:

psql -d test < .\backup_database.sql
At line:1 char:14
+ psql -d test < .\backup_database.sql
+              ~
The '<' operator is reserved for future use.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : RedirectionNotSupported

pg_dump command worked seamlessly on terminal. So where do i run psql command. Tried on dbshell-Not working, Manually adding on pgadmin 4 gives pg_restore: error: input file appears to be a text format dump. Please use psql.

0

1 Answer 1

1

Don't use redirection on Windows, use the -f parameter to pass the file to be run:

psql -d test -f backup_database.sql
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.