pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feedRemoved unused param isSlice of function transformAssignmentSubscripts
3+ messages / 3 participants
[nested] [flat]
Commits from this thread:
2022-09-18 9f65aaa408 Remove unused argument "isSlice" from transformAssignmentSubscripts()
* Removed unused param isSlice of function transformAssignmentSubscripts
@ 2022-09-13 03:35 Zhang Mingli <zmlpostgres@gmail.com>
2022-09-13 07:20 ` Re: Removed unused param isSlice of function transformAssignmentSubscripts Richard Guo <guofenglinux@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Zhang Mingli @ 2022-09-13 03:35 UTC (permalink / raw)
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Removed unused param isSlice of function transformAssignmentSubscripts
2022-09-13 03:35 Removed unused param isSlice of function transformAssignmentSubscripts Zhang Mingli <zmlpostgres@gmail.com>
@ 2022-09-13 07:20 ` Richard Guo <guofenglinux@gmail.com>
2022-09-18 06:42 ` Re: Removed unused param isSlice of function transformAssignmentSubscripts Michael Paquier <michael@paquier.xyz>
0 siblings, 1 reply; 3+ messages in thread
From: Richard Guo @ 2022-09-13 07:20 UTC (permalink / raw)
To: Zhang Mingli <zmlpostgres@gmail.com>; +Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
On Tue, Sep 13, 2022 at 11:35 AM Zhang Mingli <zmlpostgres@gmail.com> wrote:
> 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.
>
+1. Good catch.
Thanks
Richard
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Removed unused param isSlice of function transformAssignmentSubscripts
2022-09-13 03:35 Removed unused param isSlice of function transformAssignmentSubscripts Zhang Mingli <zmlpostgres@gmail.com>
2022-09-13 07:20 ` Re: Removed unused param isSlice of function transformAssignmentSubscripts Richard Guo <guofenglinux@gmail.com>
@ 2022-09-18 06:42 ` Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 3+ messages in thread
From: Michael Paquier @ 2022-09-18 06:42 UTC (permalink / raw)
To: Richard Guo <guofenglinux@gmail.com>; +Cc: Zhang Mingli <zmlpostgres@gmail.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
On Tue, Sep 13, 2022 at 03:20:01PM +0800, Richard Guo wrote:
> +1. Good catch.
Yes, you are right that this comes from c7aba7c that has changed the
transform logic and the check on slicing support, and this makes the
code easier to follow. So, applied.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2022-09-18 06:42 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-09-13 03:35 Removed unused param isSlice of function transformAssignmentSubscripts Zhang Mingli <zmlpostgres@gmail.com>
2022-09-13 07:20 ` Richard Guo <guofenglinux@gmail.com>
2022-09-18 06:42 ` Michael Paquier <michael@paquier.xyz>
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