diff options
Diffstat (limited to 'contrib/file_fdw/file_fdw.c')
-rw-r--r-- | contrib/file_fdw/file_fdw.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/contrib/file_fdw/file_fdw.c b/contrib/file_fdw/file_fdw.c index b42de873e0f..b4719913183 100644 --- a/contrib/file_fdw/file_fdw.c +++ b/contrib/file_fdw/file_fdw.c @@ -293,7 +293,7 @@ file_fdw_validator(PG_FUNCTION_ARGS) /* * Now apply the core COPY code's validation logic for more checks. */ - ProcessCopyOptions(NULL, true, other_options); + ProcessCopyOptions(NULL, NULL, true, other_options); /* * Filename option is required for file_fdw foreign tables. @@ -455,10 +455,10 @@ get_file_fdw_attribute_options(Oid relid) * force_null options set */ if (fnncolumns != NIL) - options = lappend(options, makeDefElem("force_not_null", (Node *) fnncolumns)); + options = lappend(options, makeDefElem("force_not_null", (Node *) fnncolumns, -1)); if (fncolumns != NIL) - options = lappend(options, makeDefElem("force_null", (Node *) fncolumns)); + options = lappend(options, makeDefElem("force_null", (Node *) fncolumns, -1)); return options; } @@ -511,7 +511,7 @@ fileGetForeignPaths(PlannerInfo *root, foreigntableid, &columns)) coptions = list_make1(makeDefElem("convert_selectively", - (Node *) columns)); + (Node *) columns, -1)); /* Estimate costs */ estimate_costs(root, baserel, fdw_private, @@ -632,7 +632,8 @@ fileBeginForeignScan(ForeignScanState *node, int eflags) * Create CopyState from FDW options. We always acquire all columns, so * as to match the expected ScanTupleSlot signature. */ - cstate = BeginCopyFrom(node->ss.ss_currentRelation, + cstate = BeginCopyFrom(NULL, + node->ss.ss_currentRelation, filename, false, NIL, @@ -705,7 +706,8 @@ fileReScanForeignScan(ForeignScanState *node) EndCopyFrom(festate->cstate); - festate->cstate = BeginCopyFrom(node->ss.ss_currentRelation, + festate->cstate = BeginCopyFrom(NULL, + node->ss.ss_currentRelation, festate->filename, false, NIL, @@ -1053,7 +1055,7 @@ file_acquire_sample_rows(Relation onerel, int elevel, /* * Create CopyState from FDW options. */ - cstate = BeginCopyFrom(onerel, filename, false, NIL, options); + cstate = BeginCopyFrom(NULL, onerel, filename, false, NIL, options); /* * Use per-tuple memory context to prevent leak of memory used to read |