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

Function PQpass

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

Source from the content-addressed store, hash-verified

6845}
6846
6847char *
6848PQpass(const PGconn *conn)
6849{
6850 char *password = NULL;
6851
6852 if (!conn)
6853 return NULL;
6854 if (conn->connhost != NULL)
6855 password = conn->connhost[conn->whichhost].password;
6856 if (password == NULL)
6857 password = conn->pgpass;
6858 /* Historically we've returned "" not NULL for no password specified */
6859 if (password == NULL)
6860 password = "";
6861 return password;
6862}
6863
6864char *
6865PQhost(const PGconn *conn)

Callers 2

ConnectDatabaseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected