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.96) (envelope-from ) id 1x53mH-007avJ-1D for pgsql-hackers@arkaria.postgresql.org; Fri, 11 Sep 2026 16:07:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1x53mG-00G63W-0R for pgsql-hackers@arkaria.postgresql.org; Fri, 11 Sep 2026 16:07:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1x53mF-00G637-2L for pgsql-hackers@lists.postgresql.org; Fri, 11 Sep 2026 16:06:59 +0000 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1x53mD-00000004B7E-1Ixc for pgsql-hackers@lists.postgresql.org; Fri, 11 Sep 2026 16:06:59 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id C16153EF95; Fri, 11 Sep 2026 16:06:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=postgresfriends.org; s=gm1; t=1789142814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Vnbf5eIFBmGV8ipKuNt6OTtojrb4o2jF1YzKzlxM3Qg=; b=gtmoJP3wbciMlsGynMcyhT7wd0LyA9H5h9DNWz7t69IEFlbMqPsOoqr12Gc7pwNUjh7Usy LP0+7Pzq+VtKjSUe/s97YToGTalAdWpcscQ3a00lALHLUhisHEtBnXFclkd0D3kUlcrp4z 8r5grTJXy4pQc4Dfu2KiuQ3M33/bzMoykFs1FG6pJZodILZjoQS+OSsmfMXQevj6kQnm5a wyMdsyRllIQVW+x1TPYcyNHiiM2i8IP8qlAY9zEmKCvHSxGUu8mxPAL2yInlVRJ4ZOGNWQ 1bvDqYoLVbi02mWTiVjtx+WN2RvX/62oS9oU2IkG5elrbcMGf9P0U8bzN3PoGg== Message-ID: <43d5a3f4-30b9-4fa5-9f8f-97aa2dd7cf7c@postgresfriends.org> Date: Fri, 11 Sep 2026 18:06:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Logical Implication To: Thom Brown Cc: PostgreSQL Hackers References: <37c76707-e6fa-4ee3-b57f-aa0bf1b0bba8@postgresfriends.org> Content-Language: en-US From: Vik Fearing In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-Sasl: vik@postgresfriends.org X-GND-State: clean X-GND-Score: -100 X-GND-Cause: dmFkZTGnQSoxUCpJfN8bHmbM4urqCuxbk6KUf2llj5MyO3qaW+CCaLyQ6DP5Foa+O0TNgPcQp5FKd6JRZt4Anv5B+uZF5k6SDMNPT9KWYnZ68VCuwaNtr8P/7eDvV3rB/A69hMMp8rl14lWRzMUn0UKs7aftUDi9TJZYUhdM6bealky4kd5BHuenPaxS/c4rSbhmeLL2MhMZmyQ/VsrnzfNm7RL2hHc/FAs9d8zaDY8iOsrMgCE6Wpuvkm3UUr3LN4BeAIv5TghG2zHLyUb7pdPmBEqyvfFJa5O7Y3au8X162cfYtR/6zybylm+g8Mph6xFCK0SDgi59BezoQbbjNoq0kgDAE7YMxccoiUeOExrO59oM4y+Lv+wEpleA8uXy+j463DJuOfK0VEQvHO54EK2Cfmqml9AtIpCnOr1AxypVZmqZZvEN2TCxY031C5hWZo5i5gnSbAoIl+Kz49dNduBJfP1SNljWNUYgC5FTeIDIkkOKKA6YExj3D53g5gcF1nPxa/dbALZd1EBNPsBncrFZ5SlOASBxJOy1BSC1nSTPTLjcQnSQLTpnWhZSzGAZhuj6n8/qspV7NtAkvrVQhHwl4KAN1XHEV1x5VAm7Yj/NK1FF2Qp6r5x5DsSCzYkDiYz8qEZaW4iBiZXqEwbwmzwgqCKK6NTuDumUtwCvfHeGMwEE5A List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Thom, Thanks for taking a look at it. On 11/09/2026 16:41, Thom Brown wrote: > What behaviour should be expected for the following cases: > > a IMPLIES b IMPLIES c a IMPLIES (b IMPLIES c), it is right associative. I put this exact case in the documentation. It deparses to  (NOT a) OR (NOT b) OR c. > CHECK (a IMPLIES b) -- where b is NULL > -- And what does that deparse to? This is in the documentation as well, it deparses to  NOT a OR NULL  which is either TRUE or UNKNOWN depending on what a is.  In both cases the CHECK passes. > a IMPLIES (100 / b > 10) This is an error because the operator only applies to booleans. -- Vik Fearing