I have installed PostgreSQL-15.3 and pgAdmin 4 on my system, and set up everything requires, but I am facing this error.
This is the error I am facing
I have data showing on pgAdmin
I have installed PostgreSQL-15.3 and pgAdmin 4 on my system, and set up everything requires, but I am facing this error.
This is the error I am facing
I have data showing on pgAdmin
The error you get when you type the command psql -U postgres postgres
occurs because you do not have psql added to your PATH environment variable.
To fix it, click Windows > search for Edit the System Environment Variables, and open it. The System Properties window should appear. Click on Environment Variables at the bottom right > Select PATH and click on Edit. Now, click on New and add the path to the bin folder of your PostgreSQL installation (it may be similar to C:\ProgramFiles\PostgreSQL\15\bin).
Finally, close all command prompts or terminals and reopen them to effect the changes.
I hope this helps.
You need to add psql to the path environment variable as the configuration needs to be done manually.
I think this is error is of environmental variables. To solve this, go to the psql executable in the Postgresql bin directory and add that directory path to the environmental variables.
You should check if you have psql added to your environment path. You can add that manually and try the command again.