MCPcopy Create free account
hub / github.com/apache/cloudberry / PQhost

Function PQhost

src/interfaces/libpq/fe-connect.c:6864–6885  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6862}
6863
6864char *
6865PQhost(const PGconn *conn)
6866{
6867 if (!conn)
6868 return NULL;
6869
6870 if (conn->connhost != NULL)
6871 {
6872 /*
6873 * Return the verbatim host value provided by user, or hostaddr in its
6874 * lack.
6875 */
6876 if (conn->connhost[conn->whichhost].host != NULL &&
6877 conn->connhost[conn->whichhost].host[0] != '\0')
6878 return conn->connhost[conn->whichhost].host;
6879 else if (conn->connhost[conn->whichhost].hostaddr != NULL &&
6880 conn->connhost[conn->whichhost].hostaddr[0] != '\0')
6881 return conn->connhost[conn->whichhost].hostaddr;
6882 }
6883
6884 return "";
6885}
6886
6887char *
6888PQhostaddr(const PGconn *conn)

Callers 8

libpqrcv_get_senderinfoFunction · 0.85
pg_GSS_load_servicenameFunction · 0.85
exec_command_conninfoFunction · 0.85
do_connectFunction · 0.85
SyncVariablesFunction · 0.85
get_promptFunction · 0.85
mainFunction · 0.85
main.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected