pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Zhang Mingli <zmlpostgres@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Removed unused param isSlice of function transformAssignmentSubscripts
Date: Tue, 13 Sep 2022 11:35:37 +0800
Message-ID: <0d7041ac-c704-48ad-86fd-e05feddf08ed@Spark> (raw )
In-Reply-To: <6431d806-0a33-4ab0-a042-1ef8a5908593@Spark >
References: <6431d806-0a33-4ab0-a042-1ef8a5908593@Spark >
Hi,
Param isSlice was once used to identity targetTypeId for transformAssignmentIndirection.
In commit c7aba7c14e, the evaluation was pushed down to transformContainerSubscripts.
No need to keep isSlice around transformAssignmentSubscripts.
Attach a patch to remove it.
Regards,
Zhang Mingli
Attachments:
vn-0001-Removed-unused-param-isSlice.patch (application/octet-stream, 2.3K) download
From fc86c118d317578fda025130f54b55dd50c987ef Mon Sep 17 00:00:00 2001
From: Mingli Zhang <avamingli@gmail.com>
Date: Tue, 13 Sep 2022 11:18:52 +0800
Subject: [PATCH vn] Removed unused param isSlice of function
transformAssignmentSubscripts
Param isSlice was once used to identity targetTypeId for transformAssignmentIndirection.
In commit c7aba7c14e, the evaluation was pushed down to transformContainerSubscripts.
No need to keep isSlice around transformAssignmentSubscripts.
---
src/backend/parser/parse_target.c | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/src/backend/parser/parse_target.c b/src/backend/parser/parse_target.c
index 4e1593d900..bd8057bc3e 100644
--- a/src/backend/parser/parse_target.c
+++ b/src/backend/parser/parse_target.c
@@ -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,
--
2.34.1
view thread (3+ messages) latest in thread
Message-ID: <0d7041ac-c704-48ad-86fd-e05feddf08ed@Spark>
Permalink: ../0d7041ac-c704-48ad-86fd-e05feddf08ed@Spark/
Also on: postgresql.org/message-id/0d7041ac-c704-48ad-86fd-e05feddf08ed@Spark
copy link · copy postgr.es · copy git am
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: zmlpostgres@gmail.com
Subject: Re: Removed unused param isSlice of function transformAssignmentSubscripts
In-Reply-To: <0d7041ac-c704-48ad-86fd-e05feddf08ed@Spark>
References: <6431d806-0a33-4ab0-a042-1ef8a5908593@Spark> <0d7041ac-c704-48ad-86fd-e05feddf08ed@Spark>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox