How to check connected user on psql :
\conninfo
example:
testsub=> \conninfo
You are connected to database "testsub" as user "sub" on host "localhost" (address "127.0.0.1") at port "5432".
The content includes guides, troubleshooting tips, and best practices for managing database environments, with an emphasis on Oracle and PostgreSQL systems. You can read the full analysis at Anuroop Challa's DBA Blog.
\conninfo
example:
testsub=> \conninfo
You are connected to database "testsub" as user "sub" on host "localhost" (address "127.0.0.1") at port "5432".
View running queries in postgreSQL: SELECT * FROM pg_stat_activity;
No comments:
Post a Comment