in src/afs.cc [1399:1416]
arrow::Status prepare(SPIExecuteOptions& options,
std::vector<Oid>& pgTypes,
const std::shared_ptr<arrow::Schema>& schema)
{
if (schema->num_fields() > 0)
{
options.params = makeParamList(schema->num_fields());
}
options.read_only = false;
options.tcount = 0;
ARROW_RETURN_NOT_OK(prepare_pg_types(pgTypes, schema));
for (size_t i = 0; i < pgTypes.size(); ++i)
{
options.params->params[i].pflags = PARAM_FLAG_CONST;
options.params->params[i].ptype = pgTypes[i];
}
return arrow::Status::OK();
}