PostgreSQL psql basic command


PostgresSQL psql show HELP

\help

PostgresSQL psql show List of  Databases / show databases

\list

PostgresSQL psql connect to database / use database

\connect db_name_here;

PostgresSQL psql Show List of schemes/ show all schemes (assumed you were connected to db)

\dn

PostgresSQL psql Find what is current database / what is active database now

dbyusuf=# \command_is_here

the red word is current active database, try dbyusuf=#\connect postgres ,  it will changes to

postgres=# \command_is_here

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s