Re: BUG #16242: convert_tuple_* not handling missing values correctly

From: Vik Fearing <vik(at)postgresfriends(dot)org>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: andrew(at)tao11(dot)riddles(dot)org(dot)uk, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #16242: convert_tuple_* not handling missing values correctly
Date: 2020-02-05 02:21:52
Message-ID: 3c396c9e-960f-9c03-63b7-d58e0e044fba@postgresfriends.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 05/02/2020 03:19, Andres Freund wrote:
> On 2020-02-05 03:03:04 +0100, Vik Fearing wrote:
>> On 04/02/2020 03:24, PG Bug reporting form wrote:
>>> The following example shows a tuple appearing with NULLs in a column
>>> declared NOT NULL, because there is a missing default value not being filled
>>> in. The cause is that convert_tuples_by_name, or more precisely
>>> check_attrmap_match, thinks that it's enough for the tupdescs to match up as
>>> regards attnums/names/types, without considering that the source tupdesc
>>> might have missing values that the destination does not. So it incorrectly
>>> concludes that no conversion is needed, and the missing values become
>>> null.
>>
>> Here is a quick patch that fixes this on master.
>
> Should include a regression test...

That's what I thought, too. Where should I put it?
--
Vik Fearing

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2020-02-05 02:26:34 Re: BUG #16242: convert_tuple_* not handling missing values correctly
Previous Message Andres Freund 2020-02-05 02:19:33 Re: BUG #16242: convert_tuple_* not handling missing values correctly