How to connect to postgres db
How to connect to postgres db:
postgresql configurationintermediate
by PostgreSQL
14 views
How to connect to postgres db:
1234567891011121314151617181920212223
How to connect to postgres db:
postgres$
export PATH=/Library/PostgreSQL/10/bin:$PATH
postgres$
which psql
/Library/PostgreSQL/10/bin/psql
postgres$
psql -d edb -U postgres
Password for user postgres:
psql (10.13)
Type "help" for help.
postgres=#
postgres=#
\conninfo
You are connected to database "edb" as user "postgres" via socket in "/tmp" at port "5432".
postgres=#
select current_schema,current_user,session_user,current_database();
current_schema | current_user | session_user | current_database
----------------+--------------+--------------+------------------
public | postgres. | postgres | edb
postgres-#
\c dbaclass
You are now connected to database "dbaclass" as user "postgres".Please to add comments
No comments yet. Be the first to comment!