/* Return a COPY FROM routine for the given options */
static const CopyFromRoutine *
-CopyFromGetRoutine(CopyFormatOptions opts)
+CopyFromGetRoutine(const CopyFormatOptions *opts)
{
- if (opts.csv_mode)
+ if (opts->csv_mode)
return &CopyFromRoutineCSV;
- else if (opts.binary)
+ else if (opts->binary)
return &CopyFromRoutineBinary;
/* default is text */
ProcessCopyOptions(pstate, &cstate->opts, true /* is_from */ , options);
/* Set the format routine */
- cstate->routine = CopyFromGetRoutine(cstate->opts);
+ cstate->routine = CopyFromGetRoutine(&cstate->opts);
/* Process the target relation */
cstate->rel = rel;
/* Return a COPY TO routine for the given options */
static const CopyToRoutine *
-CopyToGetRoutine(CopyFormatOptions opts)
+CopyToGetRoutine(const CopyFormatOptions *opts)
{
- if (opts.csv_mode)
+ if (opts->csv_mode)
return &CopyToRoutineCSV;
- else if (opts.binary)
+ else if (opts->binary)
return &CopyToRoutineBinary;
/* default is text */
ProcessCopyOptions(pstate, &cstate->opts, false /* is_from */ , options);
/* Set format routine */
- cstate->routine = CopyToGetRoutine(cstate->opts);
+ cstate->routine = CopyToGetRoutine(&cstate->opts);
/* Process the source/target relation or query */
if (rel)