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

Function echo_hook

src/bin/psql/startup.c:967–985  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

965}
966
967static bool
968echo_hook(const char *newval)
969{
970 Assert(newval != NULL); /* else substitute hook messed up */
971 if (pg_strcasecmp(newval, "queries") == 0)
972 pset.echo = PSQL_ECHO_QUERIES;
973 else if (pg_strcasecmp(newval, "errors") == 0)
974 pset.echo = PSQL_ECHO_ERRORS;
975 else if (pg_strcasecmp(newval, "all") == 0)
976 pset.echo = PSQL_ECHO_ALL;
977 else if (pg_strcasecmp(newval, "none") == 0)
978 pset.echo = PSQL_ECHO_NONE;
979 else
980 {
981 PsqlVarEnumError("ECHO", newval, "none, errors, queries, all");
982 return false;
983 }
984 return true;
985}
986
987static bool
988echo_hidden_hook(const char *newval)

Callers

nothing calls this directly

Calls 2

pg_strcasecmpFunction · 0.85
PsqlVarEnumErrorFunction · 0.85

Tested by

no test coverage detected