pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: elprans@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17363: 14 regression: "could not identify a hash function for type record" in a nested record in sublink
Date: Sun, 16 Jan 2022 16:00:44 -0500
Message-ID: <3820408.1642366844@sss.pgh.pa.us> (raw)
In-Reply-To: <2998707.1642001695@sss.pgh.pa.us>
References: <17363-f6d42fd0d726be02@postgresql.org>
	<2998707.1642001695@sss.pgh.pa.us>

I wrote:
> It appears that we're trying to use a hashed subplan for the =ANY,
> where v13 did not.  So I'm inclined to blame this on 01e658fa7 (Hash
> support for row types).  We backed off the optimism level a bit in
> a3d2b1bbe (Disable anonymous record hash support except in special
> cases), but evidently didn't go far enough; or else it's doing the
> wrong thing for nested RECORD types.

Ugh, found it: hash_ok_operator() is not accounting for this case.

    if (opid == ARRAY_EQ_OP)
    {
        /* array_eq is strict, but must check input type to ensure hashable */
        /* XXX record_eq will need same treatment when it becomes hashable */
        Node       *leftarg = linitial(expr->args);

        return op_hashjoinable(opid, exprType(leftarg));
    }

Will fix.

			regards, tom lane





view thread (3+ messages)

Message-ID: <3820408.1642366844@sss.pgh.pa.us>
Permalink:  ../3820408.1642366844@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3820408.1642366844@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, peter.eisentraut@enterprisedb.com, elprans@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17363: 14 regression: "could not identify a hash function for type record" in a nested record in sublink
  In-Reply-To: <3820408.1642366844@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