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

Function echo_hidden_command

src/bin/psql/command.c:5015–5037  ·  view source on GitHub ↗

* a little code borrowed from PSQLexec() to manage ECHO_HIDDEN output. * returns true unless we have ECHO_HIDDEN_NOEXEC. */

Source from the content-addressed store, hash-verified

5013 * returns true unless we have ECHO_HIDDEN_NOEXEC.
5014 */
5015static bool
5016echo_hidden_command(const char *query)
5017{
5018 if (pset.echo_hidden != PSQL_ECHO_HIDDEN_OFF)
5019 {
5020 printf(_("********* QUERY **********\n"
5021 "%s\n"
5022 "**************************\n\n"), query);
5023 fflush(stdout);
5024 if (pset.logfile)
5025 {
5026 fprintf(pset.logfile,
5027 _("********* QUERY **********\n"
5028 "%s\n"
5029 "**************************\n\n"), query);
5030 fflush(pset.logfile);
5031 }
5032
5033 if (pset.echo_hidden == PSQL_ECHO_HIDDEN_NOEXEC)
5034 return false;
5035 }
5036 return true;
5037}
5038
5039/*
5040 * Look up the object identified by obj_type and desc. If successful,

Callers 2

lookup_object_oidFunction · 0.85
get_create_object_cmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected