Showing results for 
Search instead for 
Did you mean: 

Finding the host name of the database

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)

Level 2 Adventurer

Hi sheila1372 ,


To get host info from remote server you can use below functions .


select inet_server_addr();




[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".

Ask a Question
Top Kudoed Posts