user3926863
user3926863

Reputation: 333

psql -f command not working with filename path specified

I think the command psql is not working but can't find the reason behind. I've been struggling for the last 3 hours on this.

Very new to PostgreSQL, I set up the environment on my laptop and the code below seems to be working correctly.

screenshot of console

But when I try to use the psql command and run the command

postgres=# psql -f C:\Users\36922\Desktop\products.sql inventory postgres;

I get the following error:

Invalid command \Users.

screenshot of error

I would like psql to work, but it does not. Would you have any suggestion?

Upvotes: 0

Views: 617

Answers (1)

Martin Dimitrov
Martin Dimitrov

Reputation: 1304

As @Hitobat mentioned in his comment, this command should be ran outside of the PSQL terminal in the WCP or PowerShell.

Upvotes: 1

Related Questions