Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hjK4B-0003oQ-Em for pgsql-general@arkaria.postgresql.org; Fri, 05 Jul 2019 08:59:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hjK4A-0006ud-38 for pgsql-general@arkaria.postgresql.org; Fri, 05 Jul 2019 08:59:38 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hjK49-0006rt-KH for pgsql-general@lists.postgresql.org; Fri, 05 Jul 2019 08:59:37 +0000 Received: from mout.kundenserver.de ([212.227.17.10]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hjK46-0002to-R1 for pgsql-general@lists.postgresql.org; Fri, 05 Jul 2019 08:59:36 +0000 Received: from [10.8.0.6] ([185.40.248.10]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.145]) with ESMTPSA (Nemesis) id 1MxmJs-1iS4ej3AJq-00zGzn for ; Fri, 05 Jul 2019 10:59:31 +0200 Subject: Re: Why does jsonb_set() remove non-mentioned keys? To: pgsql-general@lists.postgresql.org References: <20190704220350.514a15a5@thenautilus.net> <20190705090047.41600de5@nautilus> From: Thomas Kellerer Message-ID: Date: Fri, 5 Jul 2019 10:59:31 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 In-Reply-To: <20190705090047.41600de5@nautilus> Content-Type: text/plain; charset=utf-8 Content-Language: de-DE Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:+b3Rim8WD44U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: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Gianni Ceccarelli schrieb am 05.07.2019 um 10:00: >> strict functions with sql null inputs yield sql null output without >> even executing the function > > So when the SQL-level executor sees a call to any function declared > strict with some NULL parameters, it doesn't call the function at > all. `whatever_my_function('a string',1234,NULL)` is always `NULL` > Ah, I see. Thanks for the clarification Then I would question if declaring jsonb_set as "strict" makes sense Thomas