pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vik Fearing <vik@postgresfriends.org>
To: Andres Freund <andres@anarazel.de>
Cc: andrew@tao11.riddles.org.uk
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16242: convert_tuple_* not handling missing values correctly
Date: Wed, 5 Feb 2020 03:21:52 +0100
Message-ID: <3c396c9e-960f-9c03-63b7-d58e0e044fba@postgresfriends.org> (raw)
In-Reply-To: <20200205021933.c4wtkpcx2li3um2k@alap3.anarazel.de>
References: <16242-d1c9fca28445966b@postgresql.org>
	<31edb400-f065-73c4-7b1f-2953ad3413e6@postgresfriends.org>
	<20200205021933.c4wtkpcx2li3um2k@alap3.anarazel.de>

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





view thread (9+ messages)  latest in thread

Message-ID: <3c396c9e-960f-9c03-63b7-d58e0e044fba@postgresfriends.org>
Permalink:  ../3c396c9e-960f-9c03-63b7-d58e0e044fba@postgresfriends.org/
Also on:    postgresql.org/message-id/3c396c9e-960f-9c03-63b7-d58e0e044fba@postgresfriends.org

 · 

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: vik@postgresfriends.org, andres@anarazel.de, andrew@tao11.riddles.org.uk, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16242: convert_tuple_* not handling missing values correctly
  In-Reply-To: <3c396c9e-960f-9c03-63b7-d58e0e044fba@postgresfriends.org>

* 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