-bash: dropdb: command not found in Postgresql

 In PostgreSQL, the “psql command not found” error or the “psql” is not recognized as an internal or external command arises 

Because of the following reasons:

- Postgres is not installed on the Machine.

- The Path for Postgres tools is not set on our system.

The stated error can be fixed either by installing PostgreSQL or by setting the environment variable for the Postgres tools.

[UAT@postgres ~]$ dropdb UATDB;

-bash: dropdb: command not found

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:
# echo $PATH
/usr/bin:/bin:/opt/post/bin:/opt/post/sbin

# locate dropdb

/usr/local/pgsql/bin/dropdb

You may set the PATH variable with this command

# export PATH=/usr/local/pgsql/bin:$PATH

[UAT@postgres ~]$ dropdb UATDB;


Its working now.




No comments:

ORA-00059: Maximum Number Of DB_FILES Exceeded in 19C database

When I am adding datafile to my 19C database facing the below error. SQL> alter tablespace DATA  add datafile '/u01/data/data15.dbf...