Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pUKas-0007M8-Va for pgsql-bugs@arkaria.postgresql.org; Tue, 21 Feb 2023 04:49:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pUKar-0001lG-Dg for pgsql-bugs@arkaria.postgresql.org; Tue, 21 Feb 2023 04:49:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pUKar-0001l7-56 for pgsql-bugs@lists.postgresql.org; Tue, 21 Feb 2023 04:49:33 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pUKao-0003Jr-Ud for pgsql-bugs@lists.postgresql.org; Tue, 21 Feb 2023 04:49:32 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 31L4nQUV3892121; Mon, 20 Feb 2023 23:49:26 -0500 From: Tom Lane To: Michael Paquier cc: exclusion@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17800: ON CONFLICT DO UPDATE fails to detect incompatible fields that leads to a server crash In-reply-to: References: <17800-ff90866b3906c964@postgresql.org> Comments: In-reply-to Michael Paquier message dated "Tue, 21 Feb 2023 07:49:25 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3892119.1676954966.1@sss.pgh.pa.us> Date: Mon, 20 Feb 2023 23:49:26 -0500 Message-ID: <3892120.1676954966@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > On Sat, Feb 18, 2023 at 08:00:00AM +0000, PG Bug reporting form wrote: >> But when executing: >> UPDATE t SET (a, b) = (SELECT t.a, t.b || '+'); >> I get: >> ERROR: attribute 1 of type tp1 has wrong type >> DETAIL: Table has type text, but query expects integer. > Reproduced here. I think there may be two different bugs here. The coredump in the ON CONFLICT case goes back to v11 for me (and v10 doesn't support the primary-key-on-partition case at all, so this error may be aboriginal to the feature). But I only see this "wrong type" failure in v14 and later. I didn't try bisecting yet. regards, tom lane