Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w73BJ-004uYI-1g for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Mar 2026 03:20:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w73BH-000rk5-30 for pgsql-hackers@arkaria.postgresql.org; Mon, 30 Mar 2026 03:20:48 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w73BH-000rjw-27 for pgsql-hackers@lists.postgresql.org; Mon, 30 Mar 2026 03:20:48 +0000 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w73BF-00000001vQq-2cAO for pgsql-hackers@lists.postgresql.org; Mon, 30 Mar 2026 03:20:47 +0000 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-486fda2a389so31928085e9.1 for ; Sun, 29 Mar 2026 20:20:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774840845; cv=none; d=google.com; s=arc-20240605; b=em4oiWauWLHsuctYQc2A4bcc3g1BcqO9Ddo2Dx/c+CqfYipExLLcm4OSbUkbzwHCnQ 3S4wgSLObxPlE/71dOTrrcho3aOHBVDmes6SUrpnF+j5ZCtEL6fA/KRA2DlwzoWTgRgK HonmmDjtU+PkJ7G51GfKKBQ3DqsMJS8g+UmXD51292z1zTubqLg4G5b+6DuAdOZ2tn6d u+IM01fNADmx2/7Vw6ayYY+X5jNq4pV2L/ClVx22eLrIqJ3CqxBB6caVVLEw2NE2lfM4 Ur9Il4qs7NvPTQctUjnts5a0yf6sTC2WJCunLAJ8S+DttPqzECmMvT2zoOlhXjtG4p00 BHEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=DdRMuzEI1ZL5BYOo3Jehvyq+PHLfYn4Dw4yS712gR0c=; fh=gWEIeDmQKdd45XEEz4u6Oa1DmedM0UlgJ92BAKEBfqE=; b=SurrWaS1HEj6fP8luZFH5TBwd8KwqhXBuZgsFsAXod0KMC72OqdMT2lyjrIpkrLePt sqfn6GK7DoA1tV6vOXdOaWb3T1N2OK6t0kIyPv3UryfHVFQz2tCCxlOMXGK1tbyn/+eq jbnpE0JuASGd3AYTzZ8k5dBu+2bhCkBzV9JvXcbWIEb1Lz+qUetuwvNoRyP7lUeJZn9B SRGvSIhxRKps6kYtHSqhvfr85cyrVIqRGyjaMlgmj1Jim3BF8JKWPXqAhAKy4qyY+otx kZIurS/Wo/YCIiSdxdMgAVQlH0M4+q/kOFXfbO4BmHKxqvwFb05NU8rjmg+y+/u6Ersf 7mOw==; darn=lists.postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774840845; x=1775445645; darn=lists.postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=DdRMuzEI1ZL5BYOo3Jehvyq+PHLfYn4Dw4yS712gR0c=; b=jkurbQ3uau/FreeBZbiyV4p1OF2i8t360XATp5gbLKPAh76kUhx8BxZfazBSxLFIDQ rTH6cQLW/VwO2RBpTjVifKMt3JvNFXtdd4VvD5vaP9Omj9NeIEjZSxwSv0X8Ayr7sPDo e3jYjchs6zSWDfhbQKTpYEFrH+PfdcJhkg6D08+58a1P7nsp44+PBq1/DzCS68gDGs2g TyMuk2Q5HvUTKgOxUax0f/EElsKjZ9waQ+9gTC7F93cG1csqOs11YLg8MaUBA1PJ985W 1HWSxeh6qsDcTFtFhjvdQFgqE3YtY/SVpD8ATz/GdDV6cnQDfmG/Ffrgo7fPFXOHb4wD dXsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774840845; x=1775445645; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=DdRMuzEI1ZL5BYOo3Jehvyq+PHLfYn4Dw4yS712gR0c=; b=Sj+e0OYwhd8xel37mShp64YnRN+WTdrlp36gMOB7PuayRpXLsGuhmyK2TBdLDS6OTY dxUtGVFxG0B7LHyqG0Z5MuWvV4VhfBUO9kpCCZLnIudEiMALzCKj+8LkzCCJWg1qE6aB WqzAj2bBAdMNyl7O1i6TFFTKTBImzD/VuzkAP2HrvpuZ7l3bo6ZUKWVa0XuZTfenzktW qAsGXYJ8ibTwROuX5QLxdDo1nENB91bDedgHslCobkAdDo/ADoQC6DFfPH/O5aFimJFC TNQwT5H23+tP5BWqbD3dmRsFx4fZiXhVApILpCqcFIf9YKQplJvepKupnspZteZRcgvR 0iqA== X-Gm-Message-State: AOJu0YzsJ4GZFLAJ5Q4uSKnwE0FzzYvGIi/q6bgIW7exVxhf4Z+BHpq5 mX/YpvYWzEDgYMPywiIj2rMXJyAL62mPvnfrdg9/wCAKF4dspgJVkFqt5XA+RuKa5TP8AIjPVXV XJ29pw9fvp6DcUxhLb3oiTHnFshwLTis= X-Gm-Gg: ATEYQzwbyX5wVCYddBOH+choDTtINgxTnwg9NWRftvXhgU1Xc92QM+zSpNnEVIyI58r GSlxOi+EQywXPgNrOpCOOnK81g6bC1X06dRh4CTyaOqhid1DziclVRep2UTQRS2+aXm4rJZo/PC 9wP+5DqGPO9FWbSS3Fobjnj1Ry4dyMM9p7fNT3R/V46WWdN7qokPWuf2BuYPqC7c1O1shxwTr+c odBvmu++1t6agyMk8ymPmt50JUq6PflP7dKMLmpP/r4v1xfW1HYTPhMGhRe/EMSVkneiXUuodYO cubxd97HCXyOwWnPd+CVdzT/ux6nBDvWJ9kX/7hmBCslz5TlarKTE4P9rZ8sgsBP+7gRxV46taA e7RPy0BDW X-Received: by 2002:a05:600c:1e2a:b0:485:1878:7b8c with SMTP id 5b1f17b1804b1-48727ee9f5bmr201871535e9.18.1774840844933; Sun, 29 Mar 2026 20:20:44 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: David Rowley Date: Mon, 30 Mar 2026 16:20:33 +1300 X-Gm-Features: AQROBzCOzg8xcJrKdRKNX9hS-J-yhThyAXW8jZkwyXshk6uHUpnvwlwRAYyH7nA Message-ID: Subject: Re: Fix "could not find memoization table entry" To: Tender Wang Cc: PostgreSQL Hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 25 Mar 2026 at 22:00, Tender Wang wrote: > > David Rowley =E4=BA=8E2026=E5=B9=B43=E6=9C=8825=E6= =97=A5=E5=91=A8=E4=B8=89 10:09=E5=86=99=E9=81=93=EF=BC=9A > > > > On Wed, 25 Mar 2026 at 13:31, David Rowley wrote= : > > I was experimenting with a less risky fix by having the datum_image > > functions force the sign-extended representation of the Datum before > > hashing or comparing. > > > > Attached is a quick PoC of what that would look like. It does fix the > > reported problem. But it is a hack and doesn't fix the root cause of > > the issue. > > > > Despite the hackiness, I feel this might be better than the > > whack-a-mole approach of just fixing incorrect usages of the > > PG_RETURN_* macros as and when we find them. > > No objection from me. > It seems no users have complained about hash_numberic(), and except > for this reported issue, no internal errors have been reported due to > hash_numberic(). I cleaned that method up and pushed it. Thanks for the report. David