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 1kWkIt-0008Mq-MZ for pgsql-bugs@arkaria.postgresql.org; Sun, 25 Oct 2020 17:59:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kWkIs-0002aa-KZ for pgsql-bugs@arkaria.postgresql.org; Sun, 25 Oct 2020 17:59:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kWkIs-0002aT-Ec for pgsql-bugs@lists.postgresql.org; Sun, 25 Oct 2020 17:59:38 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kWkIq-0004W7-47 for pgsql-bugs@lists.postgresql.org; Sun, 25 Oct 2020 17:59:37 +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 09PHxUfj568705; Sun, 25 Oct 2020 13:59:30 -0400 From: Tom Lane To: Amit Langote cc: fedor_erastov@mail.ru, PostgreSQL mailing lists , Andres Freund , Andrew Dunstan Subject: Re: BUG #16644: null value for defaults in OLD variable for trigger In-reply-to: <207142.1603468329@sss.pgh.pa.us> References: <16644-5da7ef98a7ac4545@postgresql.org> <802555.1601432494@sss.pgh.pa.us> <207142.1603468329@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Fri, 23 Oct 2020 11:52:09 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <568703.1603648770.1@sss.pgh.pa.us> Date: Sun, 25 Oct 2020 13:59:30 -0400 Message-ID: <568704.1603648770@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > Amit Langote writes: >> Maybe something like the attached? > Probably needs some attention to memory management (e.g., > should_free_trig) but I'm okay with doing this as a short-term > fix. I fixed the should_free business, and spent a fair amount of time convincing myself that no other code paths in trigger.c need this, and pushed it. regards, tom lane