From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: d <dchuck@yurfish.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: ERROR: type of parameter 1 (fruit2) does not match that when preparing the plan (fruit1)
Date: Sun, 01 May 2022 15:46:50 -0400
Message-ID: <1699527.1651434410@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwbjOSOxwLPWFrVGd_c3fY8GLsezr7Zs1OpDVN8HRABR1g@mail.gmail.com>
References: <20220430162319.67986afa@metairie.davudsplace.net>
<CAKFQuwaZR0F4FL0RoP2sQ2y9v3V5GCZh9UofUmeS9BFPtsgp=Q@mail.gmail.com>
<1683365.1651424937@sss.pgh.pa.us>
<CAKFQuwbjOSOxwLPWFrVGd_c3fY8GLsezr7Zs1OpDVN8HRABR1g@mail.gmail.com>
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Sun, May 1, 2022 at 10:08 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Maybe we could improve this situation by treating a "record" parameter
>> as polymorphic, though that might cause some odd inconsistencies with
>> plpgsql's historical treatment of "record" local variables.
> The extent of needing to treat "record" as polymorphic-like seems like it
> would be limited to resolve_polymorphic_argtype in funcapi.c. Namely, in
> computing the hash key for the compiled hash entry for the function.
> Similar to how we append the trigger oid in compute_function_hashkey in
> pl.compile (which ultimately calls the former) so trigger invocations
> become per-table.
I'm hesitant to touch funcapi.c for this; the scope of potential
side-effects becomes enormous as soon as you do.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, dchuck@yurfish.com, pgsql-bugs@lists.postgresql.org
Subject: Re: ERROR: type of parameter 1 (fruit2) does not match that when preparing the plan (fruit1)
In-Reply-To: <1699527.1651434410@sss.pgh.pa.us>
* 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