From: ideriha.takeshi@fujitsu.com <ideriha.takeshi@fujitsu.com>
To: Amit Langote <amitlangote09@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: RE: The follwing error sometimes happened while updating partitioned table using inheritance; ERROR: attribute xxx of type record has wrong type
Date: Fri, 28 Jan 2022 10:51:27 +0000
Message-ID: <TYCPR01MB704195AAABCC36433438BCA2EA229@TYCPR01MB7041.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <CA+HiwqHCMvethhp8no=49waQVX5XXPk-QQSDqmXmvPRtwb00NQ@mail.gmail.com>
References: <TYCPR01MB704139A6EE54DB5F6E007DE9EA219@TYCPR01MB7041.jpnprd01.prod.outlook.com>
<CA+HiwqHCMvethhp8no=49waQVX5XXPk-QQSDqmXmvPRtwb00NQ@mail.gmail.com>
Hi Amit,
>Thanks for the report.
>
>This looks to me like a bug of inheritance_planner() that is used for planning inherited UPDATEs till v13.
Thank you for the quick response and detailed explanation!
I'm not familiar with source code around planner, so I really appreciate that.
> adjust_appendrel_attrs() simply copies any Params it finds in the original tree as-is by way of expression_tree_mutator(), though perhaps it should add new ones that refer to the child plan. I'll take a shot at that.
If you work on this, it'd be wonderful because this issue actually occurred in one of my client's system.
(Of course, SQL I wrote is not actual one.)
Best regards,
Takeshi Ideriha
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-bugs@postgresql.org
Cc: ideriha.takeshi@fujitsu.com, amitlangote09@gmail.com
Subject: Re: The follwing error sometimes happened while updating partitioned table using inheritance; ERROR: attribute xxx of type record has wrong type
In-Reply-To: <TYCPR01MB704195AAABCC36433438BCA2EA229@TYCPR01MB7041.jpnprd01.prod.outlook.com>
References: <TYCPR01MB704139A6EE54DB5F6E007DE9EA219@TYCPR01MB7041.jpnprd01.prod.outlook.com> <CA+HiwqHCMvethhp8no=49waQVX5XXPk-QQSDqmXmvPRtwb00NQ@mail.gmail.com> <TYCPR01MB704195AAABCC36433438BCA2EA229@TYCPR01MB7041.jpnprd01.prod.outlook.com>
* 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