1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-18 17:42:25 +03:00

Remove unused argument "isSlice" from transformAssignmentSubscripts()

Since c7aba7c, the transform method used during parse analysis of a
subcripting construct has moved from transformAssignmentSubscripts() to
the per-type transform method (arrays or arbitrary types) the step that
checks for slicing support, but transformAssignmentSubscripts() has kept
traces of it.  Removing it simplifies the code, so let's clean up all
that.

Author: Zhang Mingli
Reviewed-by: Richard Guo
Discussion: https://postgr.es/m/0d7041ac-c704-48ad-86fd-e05feddf08ed@Spark
This commit is contained in:
Michael Paquier
2022-09-18 15:33:16 +09:00
parent 035ce1feb2
commit 9f65aaa408

View File

@ -41,7 +41,6 @@ static Node *transformAssignmentSubscripts(ParseState *pstate,
int32 targetTypMod,
Oid targetCollation,
List *subscripts,
bool isSlice,
List *indirection,
ListCell *next_indirection,
Node *rhs,
@ -697,7 +696,6 @@ transformAssignmentIndirection(ParseState *pstate,
{
Node *result;
List *subscripts = NIL;
bool isSlice = false;
ListCell *i;
if (indirection_cell && !basenode)
@ -727,11 +725,7 @@ transformAssignmentIndirection(ParseState *pstate,
Node *n = lfirst(i);
if (IsA(n, A_Indices))
{
subscripts = lappend(subscripts, n);
if (((A_Indices *) n)->is_slice)
isSlice = true;
}
else if (IsA(n, A_Star))
{
ereport(ERROR,
@ -763,7 +757,6 @@ transformAssignmentIndirection(ParseState *pstate,
targetTypMod,
targetCollation,
subscripts,
isSlice,
indirection,
i,
rhs,
@ -853,7 +846,6 @@ transformAssignmentIndirection(ParseState *pstate,
targetTypMod,
targetCollation,
subscripts,
isSlice,
indirection,
NULL,
rhs,
@ -907,7 +899,6 @@ transformAssignmentSubscripts(ParseState *pstate,
int32 targetTypMod,
Oid targetCollation,
List *subscripts,
bool isSlice,
List *indirection,
ListCell *next_indirection,
Node *rhs,