0

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

enter image description here

I have data showing on pgAdmin

enter image description here

James Z
  • 12,209
  • 10
  • 24
  • 44
  • Please dont post images. Do you have the PW setup/added to the DB that may not be in your code? https://stackoverflow.com/help/minimal-reproducible-example – Brad Jul 18 '23 at 17:41
  • I followed a video step by step, and my system is showing this error. do I need to install any dependencies? – Vinay Kumar Talreja Jul 18 '23 at 17:44
  • 1
    psql is not in your PATH. As I recall, on Windows you need to configure PATH yourself, the installed doesn't do it for you. – jjanes Jul 18 '23 at 19:01

4 Answers4

2

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.

0

You need to add psql to the path environment variable as the configuration needs to be done manually.

0

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.

adil shahid
  • 125
  • 4
0

You should check if you have psql added to your environment path. You can add that manually and try the command again.