Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qfyCf-00DtX5-G3 for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Sep 2023 07:52:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qfyCe-006Dlz-4v for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Sep 2023 07:52:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qfyCd-006Dlf-Qn for pgsql-hackers@lists.postgresql.org; Tue, 12 Sep 2023 07:52:55 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qfyCa-0046mz-Mp for pgsql-hackers@postgresql.org; Tue, 12 Sep 2023 07:52:54 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 2AD8C5C0115; Tue, 12 Sep 2023 03:52:52 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Tue, 12 Sep 2023 03:52:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding:content-type:content-type :date:date:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to; s=fm3; t=1694505172; x=1694591572; bh=o+z9YHAxVGsxJwR2MIW8vGDus t9Gn253OkkqkC8UfWM=; b=ii7zUn6ZOI9tHiodXW6xac446/wLKDzOGM8rkuUf4 R8WSFEgcJ4SU6rBkmvqkzjHTeCMKjYb25TBTLh1u2mvBZguMx27XwHH1I2mjwd5L YLVkEBAC9MsNUEP+WDyEJvOHZXxemqBEXnEdK3ep4sDkAZ0UoOtpBMimfEIpPHRZ 5z6MikBotH2ozvac1orPHt5AXM2GHz1g/fUFSiF6k3NwDfomQdDrpqMAbu0MVkhT 1qe7VhorX8mJZwIhNimzCK3zGxz9iClLfnr9MJTFC2Ql3UNi5rwKmcmlrVQT7Rg8 jiafP7hX22/GqX0cDKNMV5am6euoVa9FzYw3MiJTbF9FQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1694505172; x=1694591572; bh=o+z9YHAxVGsxJwR2MIW8vGDust9Gn253Okk qkC8UfWM=; b=R8lsOCz3EGEnaSGskRXqMo0mfRtNiY7J3Xg07DOLNyy3NUIyu8v RSBMUXNeoDhiR03gpJmzxlrbkCwDc0rX3m2M7LdOBusOLQIs+MncCJlTldZ7s3zh zWHmxkKBcAb5h9YrZxFvzgsu3hPasPc1NkaA7i8k5iFChdem61xBzXxwkGQA1fyX 6X+KFLEajBWe0ZTzdW/FBVNvEKhzD9rP9vTb5xFbhFLyuLy01j8JJsCd4n2OmLdv HDjHlz6jHvHRcT4vfM3xnM5QPNIb+TGidEm3AXK0qwpsHD7uS9hgpf6CJYn1M9lC 03vK++bieBgtuAjX4QKzX2lC/jirXeZdrLg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeihedguddvvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomheprfgv thgvrhcugfhishgvnhhtrhgruhhtuceophgvthgvrhesvghishgvnhhtrhgruhhtrdhorh hgqeenucggtffrrghtthgvrhhnpeehieeuhfelleefieekheekgfekgefgveehuedvjeev tedtgeelkeffffeikeeutdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 12 Sep 2023 03:52:50 -0400 (EDT) Message-ID: Date: Tue, 12 Sep 2023 09:52:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: remaining sql/json patches Content-Language: en-US To: Alvaro Herrera , Amit Langote Cc: Erik Rijkers , jian he , Andrew Dunstan , PostgreSQL-development References: <202309061501.xcwpfa2jjj5n@alvherre.pgsql> From: Peter Eisentraut In-Reply-To: <202309061501.xcwpfa2jjj5n@alvherre.pgsql> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 06.09.23 17:01, Alvaro Herrera wrote: > Assert()ing that a pointer is not null, and in the next line > dereferencing that pointer, is useless: the process would crash anyway > at the time of dereference, so the Assert() adds no value. Better to > leave the assert out. I don't think this is quite correct. If you dereference a pointer, the compiler may assume that it is not null and rearrange code accordingly. So it might not crash. Keeping the assertion would alter that assumption.