Skip to content

Commit afe281d

Browse files
committed
Revert "apply 0007-Add-clause-PASSWORD-val-USING-protocol-to-CREATE-ALT.patch + cherry-pick 49eb0fd"
This reverts commit 54ff1d3.
1 parent 7b537cb commit afe281d

40 files changed

+352
-533
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
return options;
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

doc/src/sgml/ref/alter_role.sgml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ ALTER ROLE <replaceable class="PARAMETER">role_specification</replaceable> [ WIT
3434
| BYPASSRLS | NOBYPASSRLS
3535
| CONNECTION LIMIT <replaceable class="PARAMETER">connlimit</replaceable>
3636
| [ ENCRYPTED | UNENCRYPTED ] PASSWORD '<replaceable class="PARAMETER">password</replaceable>'
37-
| PASSWORD '<replaceable class="PARAMETER">password</replaceable>' USING '<replaceable class="PARAMETER">protocol</replaceable>'
3837
| VALID UNTIL '<replaceable class="PARAMETER">timestamp</replaceable>'
3938

4039
ALTER ROLE <replaceable class="PARAMETER">name</replaceable> RENAME TO <replaceable>new_name</replaceable>
@@ -170,7 +169,6 @@ ALTER ROLE { <replaceable class="PARAMETER">role_specification</replaceable> | A
170169
<term><literal>NOBYPASSRLS</literal></term>
171170
<term><literal>CONNECTION LIMIT</literal> <replaceable class="parameter">connlimit</replaceable></term>
172171
<term><literal>PASSWORD</> <replaceable class="parameter">password</replaceable></term>
173-
<term><literal>PASSWORD</> <replaceable class="parameter">password</replaceable> USING <replaceable class="parameter">protocol</replaceable></term>
174172
<term><literal>ENCRYPTED</></term>
175173
<term><literal>UNENCRYPTED</></term>
176174
<term><literal>VALID UNTIL</literal> '<replaceable class="parameter">timestamp</replaceable>'</term>

doc/src/sgml/ref/create_role.sgml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ CREATE ROLE <replaceable class="PARAMETER">name</replaceable> [ [ WITH ] <replac
3434
| BYPASSRLS | NOBYPASSRLS
3535
| CONNECTION LIMIT <replaceable class="PARAMETER">connlimit</replaceable>
3636
| [ ENCRYPTED | UNENCRYPTED ] PASSWORD '<replaceable class="PARAMETER">password</replaceable>'
37-
| PASSWORD '<replaceable class="PARAMETER">password</replaceable>' USING '<replaceable class="PARAMETER">protocol</replaceable>'
3837
| VALID UNTIL '<replaceable class="PARAMETER">timestamp</replaceable>'
3938
| IN ROLE <replaceable class="PARAMETER">role_name</replaceable> [, ...]
4039
| IN GROUP <replaceable class="PARAMETER">role_name</replaceable> [, ...]
@@ -245,24 +244,6 @@ CREATE ROLE <replaceable class="PARAMETER">name</replaceable> [ [ WITH ] <replac
245244
</listitem>
246245
</varlistentry>
247246

248-
<varlistentry>
249-
<term><literal>PASSWORD</> <replaceable class="parameter">password</replaceable> USING <replaceable class="parameter">protocol</replaceable></term>
250-
<listitem>
251-
<para>
252-
Sets the role's password using the requested protocol. (A password
253-
is only of use for roles having the <literal>LOGIN</literal>
254-
attribute, but you can nonetheless define one for roles without it.)
255-
If you do not plan to use password authentication you can omit this
256-
option. The protocols supported are <literal>md5</> to enforce
257-
a password to be MD5-encrypted, <literal>scram</> to enforce a password
258-
to be encrypted with SCRAM-SHA256, or <literal>plain</> to use
259-
an unencrypted password. If the password string is already in
260-
MD5-encrypted or SCRAM-encrypted format, then it is stored encrypted
261-
as-is.
262-
</para>
263-
</listitem>
264-
</varlistentry>
265-
266247
<varlistentry>
267248
<term><literal>VALID UNTIL</literal> '<replaceable class="parameter">timestamp</replaceable>'</term>
268249
<listitem>

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
return result;

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
InternalDefaultACL iacls;
@@ -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
else if (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, bool oldstyle, List *parameters)
55+
DefineAggregate(List *name, List *args, bool oldstyle, List *parameters,
56+
const char *queryString)
5657
{
5758
char *aggName;
5859
Oid aggNamespace;
@@ -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
Oid collNamespace;
@@ -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)