Skip to main content
corrected query
Source Link

You need to execute following query to get the hostname:

selectSELECT inet_server_addr();boot_val,reset_val
FROM pg_settings
WHERE name='listen_addresses';;

You need to execute following query to get the hostname:

select inet_server_addr();

You need to execute following query to get the hostname:

SELECT boot_val,reset_val
FROM pg_settings
WHERE name='listen_addresses';;
updated to correct function
Source Link

You need to execute following query to get the hostname:

select inet_client_addrinet_server_addr();

You need to execute following query to get the hostname:

select inet_client_addr();

You need to execute following query to get the hostname:

select inet_server_addr();
Source Link

You need to execute following query to get the hostname:

select inet_client_addr();