/*
* 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.
* 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;
}
foreigntableid,
&columns))
coptions = list_make1(makeDefElem("convert_selectively",
- (Node *) columns));
+ (Node *) columns, -1));
/* Estimate costs */
estimate_costs(root, baserel, fdw_private,
* 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,
EndCopyFrom(festate->cstate);
- festate->cstate = BeginCopyFrom(node->ss.ss_currentRelation,
+ festate->cstate = BeginCopyFrom(NULL,
+ node->ss.ss_currentRelation,
festate->filename,
false,
NIL,
/*
* 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
* ALTER DEFAULT PRIVILEGES statement
*/
void
-ExecAlterDefaultPrivilegesStmt(AlterDefaultPrivilegesStmt *stmt)
+ExecAlterDefaultPrivilegesStmt(ParseState *pstate, AlterDefaultPrivilegesStmt *stmt)
{
GrantStmt *action = stmt->action;
InternalDefaultACL iacls;
if (dnspnames)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
- errmsg("conflicting or redundant options")));
+ errmsg("conflicting or redundant options"),
+ parser_errposition(pstate, defel->location)));
dnspnames = defel;
}
else if (strcmp(defel->defname, "roles") == 0)
if (drolespecs)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR),
- errmsg("conflicting or redundant options")));
+ errmsg("conflicting or redundant options"),
+ parser_errposition(pstate, defel->location)));
drolespecs = defel;
}
else
* "parameters" is a list of DefElem representing the agg's definition clauses.
*/
ObjectAddress
-DefineAggregate(List *name, List *args, bool oldstyle, List *parameters,
- const char *queryString)
+DefineAggregate(ParseState *pstate, List *name, List *args, bool oldstyle, List *parameters)
{
char *aggName;
Oid aggNamespace;
errmsg("basetype is redundant with aggregate input type specification")));