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

Function exec_command_copy

src/bin/psql/command.c:642–659  ·  view source on GitHub ↗

* \copy -- run a COPY command */

Source from the content-addressed store, hash-verified

640 * \copy -- run a COPY command
641 */
642static backslashResult
643exec_command_copy(PsqlScanState scan_state, bool active_branch)
644{
645 bool success = true;
646
647 if (active_branch)
648 {
649 char *opt = psql_scan_slash_option(scan_state,
650 OT_WHOLE_LINE, NULL, false);
651
652 success = do_copy(opt);
653 free(opt);
654 }
655 else
656 ignore_slash_whole_line(scan_state);
657
658 return success ? PSQL_CMD_SKIP_LINE : PSQL_CMD_ERROR;
659}
660
661/*
662 * \copyright -- print copyright notice

Callers 1

exec_commandFunction · 0.85

Calls 2

do_copyFunction · 0.85
ignore_slash_whole_lineFunction · 0.85

Tested by

no test coverage detected