Skip to content

Commit 9f65aaa

Browse files
committed
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
1 parent 035ce1f commit 9f65aaa

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/backend/parser/parse_target.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ static Node *transformAssignmentSubscripts(ParseState *pstate,
4141
int32 targetTypMod,
4242
Oid targetCollation,
4343
List *subscripts,
44-
bool isSlice,
4544
List *indirection,
4645
ListCell *next_indirection,
4746
Node *rhs,
@@ -697,7 +696,6 @@ transformAssignmentIndirection(ParseState *pstate,
697696
{
698697
Node *result;
699698
List *subscripts = NIL;
700-
bool isSlice = false;
701699
ListCell *i;
702700

703701
if (indirection_cell && !basenode)
@@ -727,11 +725,7 @@ transformAssignmentIndirection(ParseState *pstate,
727725
Node *n = lfirst(i);
728726

729727
if (IsA(n, A_Indices))
730-
{
731728
subscripts = lappend(subscripts, n);
732-
if (((A_Indices *) n)->is_slice)
733-
isSlice = true;
734-
}
735729
else if (IsA(n, A_Star))
736730
{
737731
ereport(ERROR,
@@ -763,7 +757,6 @@ transformAssignmentIndirection(ParseState *pstate,
763757
targetTypMod,
764758
targetCollation,
765759
subscripts,
766-
isSlice,
767760
indirection,
768761
i,
769762
rhs,
@@ -853,7 +846,6 @@ transformAssignmentIndirection(ParseState *pstate,
853846
targetTypMod,
854847
targetCollation,
855848
subscripts,
856-
isSlice,
857849
indirection,
858850
NULL,
859851
rhs,
@@ -907,7 +899,6 @@ transformAssignmentSubscripts(ParseState *pstate,
907899
int32 targetTypMod,
908900
Oid targetCollation,
909901
List *subscripts,
910-
bool isSlice,
911902
List *indirection,
912903
ListCell *next_indirection,
913904
Node *rhs,

0 commit comments

Comments
 (0)