Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf5ecbe0

Browse files
committed
Revert "Add location field to DefElem"
This reverts commit49eb0fd.
1 parenta1643df commitf5ecbe0

38 files changed

+347
-438
lines changed

‎contrib/file_fdw/file_fdw.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ file_fdw_validator(PG_FUNCTION_ARGS)
293293
/*
294294
* Now apply the core COPY code's validation logic for more checks.
295295
*/
296-
ProcessCopyOptions(NULL,NULL,true,other_options);
296+
ProcessCopyOptions(NULL, true,other_options);
297297

298298
/*
299299
* Filename option is required for file_fdw foreign tables.
@@ -455,10 +455,10 @@ get_file_fdw_attribute_options(Oid relid)
455455
* force_null options set
456456
*/
457457
if (fnncolumns!=NIL)
458-
options=lappend(options,makeDefElem("force_not_null", (Node*)fnncolumns,-1));
458+
options=lappend(options,makeDefElem("force_not_null", (Node*)fnncolumns));
459459

460460
if (fncolumns!=NIL)
461-
options=lappend(options,makeDefElem("force_null", (Node*)fncolumns,-1));
461+
options=lappend(options,makeDefElem("force_null", (Node*)fncolumns));
462462

463463
returnoptions;
464464
}
@@ -511,7 +511,7 @@ fileGetForeignPaths(PlannerInfo *root,
511511
foreigntableid,
512512
&columns))
513513
coptions=list_make1(makeDefElem("convert_selectively",
514-
(Node*)columns,-1));
514+
(Node*)columns));
515515

516516
/* Estimate costs */
517517
estimate_costs(root,baserel,fdw_private,
@@ -632,8 +632,7 @@ fileBeginForeignScan(ForeignScanState *node, int eflags)
632632
* Create CopyState from FDW options. We always acquire all columns, so
633633
* as to match the expected ScanTupleSlot signature.
634634
*/
635-
cstate=BeginCopyFrom(NULL,
636-
node->ss.ss_currentRelation,
635+
cstate=BeginCopyFrom(node->ss.ss_currentRelation,
637636
filename,
638637
false,
639638
NIL,
@@ -706,8 +705,7 @@ fileReScanForeignScan(ForeignScanState *node)
706705

707706
EndCopyFrom(festate->cstate);
708707

709-
festate->cstate=BeginCopyFrom(NULL,
710-
node->ss.ss_currentRelation,
708+
festate->cstate=BeginCopyFrom(node->ss.ss_currentRelation,
711709
festate->filename,
712710
false,
713711
NIL,
@@ -1055,7 +1053,7 @@ file_acquire_sample_rows(Relation onerel, int elevel,
10551053
/*
10561054
* Create CopyState from FDW options.
10571055
*/
1058-
cstate=BeginCopyFrom(NULL,onerel,filename, false,NIL,options);
1056+
cstate=BeginCopyFrom(onerel,filename, false,NIL,options);
10591057

10601058
/*
10611059
* Use per-tuple memory context to prevent leak of memory used to read

‎src/backend/access/common/reloptions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ untransformRelOptions(Datum options)
897897
*p++='\0';
898898
val= (Node*)makeString(pstrdup(p));
899899
}
900-
result=lappend(result,makeDefElem(pstrdup(s),val,-1));
900+
result=lappend(result,makeDefElem(pstrdup(s),val));
901901
}
902902

903903
returnresult;

‎src/backend/catalog/aclchk.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ getRelationsInNamespace(Oid namespaceId, char relkind)
849849
* ALTER DEFAULT PRIVILEGES statement
850850
*/
851851
void
852-
ExecAlterDefaultPrivilegesStmt(ParseState*pstate,AlterDefaultPrivilegesStmt*stmt)
852+
ExecAlterDefaultPrivilegesStmt(AlterDefaultPrivilegesStmt*stmt)
853853
{
854854
GrantStmt*action=stmt->action;
855855
InternalDefaultACLiacls;
@@ -871,17 +871,15 @@ ExecAlterDefaultPrivilegesStmt(ParseState *pstate, AlterDefaultPrivilegesStmt *s
871871
if (dnspnames)
872872
ereport(ERROR,
873873
(errcode(ERRCODE_SYNTAX_ERROR),
874-
errmsg("conflicting or redundant options"),
875-
parser_errposition(pstate,defel->location)));
874+
errmsg("conflicting or redundant options")));
876875
dnspnames=defel;
877876
}
878877
elseif (strcmp(defel->defname,"roles")==0)
879878
{
880879
if (drolespecs)
881880
ereport(ERROR,
882881
(errcode(ERRCODE_SYNTAX_ERROR),
883-
errmsg("conflicting or redundant options"),
884-
parser_errposition(pstate,defel->location)));
882+
errmsg("conflicting or redundant options")));
885883
drolespecs=defel;
886884
}
887885
else

‎src/backend/commands/aggregatecmds.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@
5252
* "parameters" is a list of DefElem representing the agg's definition clauses.
5353
*/
5454
ObjectAddress
55-
DefineAggregate(ParseState*pstate,List*name,List*args,boololdstyle,List*parameters)
55+
DefineAggregate(List*name,List*args,boololdstyle,List*parameters,
56+
constchar*queryString)
5657
{
5758
char*aggName;
5859
OidaggNamespace;
@@ -286,10 +287,10 @@ DefineAggregate(ParseState *pstate, List *name, List *args, bool oldstyle, List
286287
errmsg("basetype is redundant with aggregate input type specification")));
287288

288289
numArgs=list_length(args);
289-
interpret_function_parameter_list(pstate,
290-
args,
290+
interpret_function_parameter_list(args,
291291
InvalidOid,
292292
true,/* is an aggregate */
293+
queryString,
293294
&parameterTypes,
294295
&allParameterTypes,
295296
&parameterModes,

‎src/backend/commands/collationcmds.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* CREATE COLLATION
3939
*/
4040
ObjectAddress
41-
DefineCollation(ParseState*pstate,List*names,List*parameters)
41+
DefineCollation(List*names,List*parameters)
4242
{
4343
char*collName;
4444
OidcollNamespace;
@@ -78,8 +78,7 @@ DefineCollation(ParseState *pstate, List *names, List *parameters)
7878
ereport(ERROR,
7979
(errcode(ERRCODE_SYNTAX_ERROR),
8080
errmsg("collation attribute \"%s\" not recognized",
81-
defel->defname),
82-
parser_errposition(pstate,defel->location)));
81+
defel->defname)));
8382
break;
8483
}
8584

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp