Re: BUG #17800: ON CONFLICT DO UPDATE fails to detect incompatible fields that leads to a server crash

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: exclusion(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17800: ON CONFLICT DO UPDATE fails to detect incompatible fields that leads to a server crash
Date: 2023-02-21 04:49:26
Message-ID: 3892120.1676954966@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Michael Paquier <michael(at)paquier(dot)xyz> 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2023-02-21 05:37:55 Re: BUG #17800: ON CONFLICT DO UPDATE fails to detect incompatible fields that leads to a server crash
Previous Message Kyotaro Horiguchi 2023-02-21 04:36:23 Re: BUG #17789: process_pgfdw_appname() fails for autovacuum workers