Finding the host name of the database
Is there a view or function in edb that will give you the host name of the database? Like not just the database name but the server host and not my local host but the actual server host the database resides on? I have tried what I have found but nothing giving me what I need.
Accepted Solutions (0)
Answers (1)
Answers (1)
- Report Inappropriate Content
Hi sheila1372 ,
To get host info from remote server you can use below functions .
select inet_server_addr();
Or
[postgres@master ~]$ psql -d postgres -h slave
psql (10.7, server 10.6)
Type "help" for help.
postgres=# \conninfo
You are connected to database "postgres" as user "postgres" on host "slave" at port "5432".
Comments (0)
Comments (0)