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

Function exec_command_slash_command_help

src/bin/psql/command.c:2791–2815  ·  view source on GitHub ↗

* \? -- print help about backslash commands */

Source from the content-addressed store, hash-verified

2789 * \? -- print help about backslash commands
2790 */
2791static backslashResult
2792exec_command_slash_command_help(PsqlScanState scan_state, bool active_branch)
2793{
2794 if (active_branch)
2795 {
2796 char *opt0 = psql_scan_slash_option(scan_state,
2797 OT_NORMAL, NULL, false);
2798
2799 if (!opt0 || strcmp(opt0, "commands") == 0)
2800 slashUsage(pset.popt.topt.pager);
2801 else if (strcmp(opt0, "options") == 0)
2802 usage(pset.popt.topt.pager);
2803 else if (strcmp(opt0, "variables") == 0)
2804 helpVariables(pset.popt.topt.pager);
2805 else
2806 slashUsage(pset.popt.topt.pager);
2807
2808 if (opt0)
2809 free(opt0);
2810 }
2811 else
2812 ignore_slash_options(scan_state);
2813
2814 return PSQL_CMD_SKIP_LINE;
2815}
2816
2817
2818/*

Callers 1

exec_commandFunction · 0.85

Calls 4

slashUsageFunction · 0.85
helpVariablesFunction · 0.85
ignore_slash_optionsFunction · 0.85
usageFunction · 0.70

Tested by

no test coverage detected