From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: David Rowley <drowley@postgresql.org>
Cc: Jaime Casanova <jcasanov@systemguards.com.ec>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: jsonb crash
Date: Wed, 29 Sep 2021 17:09:48 -0400
Message-ID: <3001998.1632949788@sss.pgh.pa.us> (raw)
In-Reply-To: <CAApHDvo6XS8Gxs1JMROPdAX8MTe=FWCesH5Y+jzGZD3ADawsnQ@mail.gmail.com>
References: <20210929185544.GB24346@ahch-to>
<2998377.1632945612@sss.pgh.pa.us>
<2999546.1632947043@sss.pgh.pa.us>
<CAApHDvo6XS8Gxs1JMROPdAX8MTe=FWCesH5Y+jzGZD3ADawsnQ@mail.gmail.com>
David Rowley <dgrowleyml@gmail.com> writes:
> On Thu, 30 Sept 2021 at 09:24, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> After further inspection, "what are we doing in jsonb_hash?" is
>> indeed a relevant question, but it seems like it's a type mismatch
>> not a nullness issue. EXPLAIN VERBOSE shows
> I think you're right here. It should be hashing text. That seems to
> be going wrong in check_memoizable() because it assumes it's always
> fine to use the left side's type of the OpExpr to figure out the hash
> function to use.
> Maybe we can cache the left and the right type's hash function and use
> the correct one in paraminfo_get_equal_hashops().
Um ... it seems to have correctly identified the cache key expressions,
so why isn't it just doing exprType on those? The jsonb_exists operator
seems entirely irrelevant here.
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 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: tgl@sss.pgh.pa.us, dgrowleyml@gmail.com, drowley@postgresql.org, jcasanov@systemguards.com.ec
Subject: Re: jsonb crash
In-Reply-To: <3001998.1632949788@sss.pgh.pa.us>
References: <20210929185544.GB24346@ahch-to> <2998377.1632945612@sss.pgh.pa.us> <2999546.1632947043@sss.pgh.pa.us> <CAApHDvo6XS8Gxs1JMROPdAX8MTe=FWCesH5Y+jzGZD3ADawsnQ@mail.gmail.com> <3001998.1632949788@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