1

Is it possible to find the host on which the PostgreSQL Server runs ?

1 Answer 1

5

Use SELECT inet_server_addr(), but it'll return NULL if connection is established via Unix-domain socket. And there's inet_server_port() which returns the port server is listening.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.