On Windows 10, using psql with PostgreSQL 14 installed, I'm trying to restore a dump that is my_dump.sql
.
I'm on Bash terminal currently.
I'm connected to psql server and I created a new database new_db
, then a new superuser tobe
.
Then I tried the command psql -d new_db < my_dump.sql
but I'm getting the error stdin is not a tty
I tried the solution psql -U tobe -d new_db -f my_dump.sql
from "stdin is not a tty" when populating Postgres database
because they mention the error but now I get a new error:
ERROR: syntax error at or near "ÿþ" LIGNE 1 : ÿþ
Are the two errors connected? Maybe the second error is only related to the command syntax. I'm not sure if I'm in the right direction.
CodePudding user response:
Try
psql.exe -U tobe -d new_db -f my_dump.sql