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

Function UserMappingPasswordRequired

contrib/postgres_fdw/connection.c:472–486  ·  view source on GitHub ↗

* Return true if the password_required is defined and false for this user * mapping, otherwise false. The mapping has been pre-validated. */

Source from the content-addressed store, hash-verified

470 * mapping, otherwise false. The mapping has been pre-validated.
471 */
472static bool
473UserMappingPasswordRequired(UserMapping *user)
474{
475 ListCell *cell;
476
477 foreach(cell, user->options)
478 {
479 DefElem *def = (DefElem *) lfirst(cell);
480
481 if (strcmp(def->defname, "password_required") == 0)
482 return defGetBoolean(def);
483 }
484
485 return true;
486}
487
488/*
489 * For non-superusers, insist that the connstr specify a password. This

Callers 2

connect_pg_serverFunction · 0.85
check_conn_paramsFunction · 0.85

Calls 2

defGetBooleanFunction · 0.85
foreachFunction · 0.50

Tested by

no test coverage detected