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 1tNv6T-002yGZ-JH for pgsql-general@arkaria.postgresql.org; Wed, 18 Dec 2024 14:32:45 +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 1tNv6S-00FUG3-UV for pgsql-general@arkaria.postgresql.org; Wed, 18 Dec 2024 14:32:44 +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 1tNv6S-00FUFv-EC for pgsql-general@lists.postgresql.org; Wed, 18 Dec 2024 14:32:44 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1tNv6L-000DC5-AB for pgsql-general@postgresql.org; Wed, 18 Dec 2024 14:32:42 +0000 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5d3f28881d6so8654551a12.1 for ; Wed, 18 Dec 2024 06:32:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=google; t=1734532356; x=1735137156; darn=postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:from:to:cc:subject:date :message-id:reply-to; bh=DS8bImEvDz3OawR3yhMJtU6Wc2Ic4PfO5AJLaHx5pC8=; b=Fhmqg2clf3pI8CN6ce8FSrPMFdaOEG1kZUVRvKTub4A7cCABX75VuWJpggF5/d1BQr CyTiF1nlevZ4UpkESxgCgUmPj9JGF+63aj9T6/+67CPGk9CKrEcMq7DJrIE965D5zRW6 nfXw7ZCfYiLLeKRT6g1vSzyDH0I/syPp8s7W3icohZfu3ytKlB/eOyyPGbljGCPIs81k Ctdk855GqsZIrTNdC7uG7gCvvlkoD8/cYE59mZ/w//EEV8ZuEB+55QH/fjwWdBFoyQyC A/Z27YAGl1IRcw/zQsRku8OPIZe4sll3YVNfmVM5/fpU87wyNeSPde3fCWFdsBLvNK/S qeuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734532356; x=1735137156; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=DS8bImEvDz3OawR3yhMJtU6Wc2Ic4PfO5AJLaHx5pC8=; b=J4BIRdLUYCgJ02ePuu0yk6L3TR+XMWbWs2tOVjq362650FodoWeTThHpWpkbUPcH1M hUk9RXbj0R6Z8V2jha9Ec9VwvNmntzOqaOVPFXYQisdZrCwEz6GQSHj5Gfc+sD/S9ViP DruDl5U2oU+Z3HDPOh84pEuhWihyMzDbPV2nQ9QJuZprUwxwZ/bWd+XQWqDyhdXAlIuS 0al8iWrrV98IGf6HqqXFZAp/j2AibvvvmPcrgkSTw31y3BCfys7G8rk4IlEfMNSpsWth Cf4Jj6BN35w4wXYQvnYnxcDY/a0eoshmM2KQwRARmqWBI/XFn27DDI1yLqRENvtuiMg+ 3zVQ== X-Forwarded-Encrypted: i=1; AJvYcCUd+kitUIEgbqvo26S/nD28/Y0Mi2n4Wmjy2Vta5uZYoHUVeb0YPjD3h4OY+ppjbTbPuYOmXjLXy+kGQbpx@postgresql.org X-Gm-Message-State: AOJu0YwiL7pyNiG0nBiavZjq6GiYP60Bt7HFqkRUI+ypGGvrGGqkfjqX wAsNRNU49Z+77ziDPt64BPYq6323mMn1ecB22tga4tGIPHJzyPgVaL6+n7u65ZAZkkZM124S+O2 ayM4= X-Gm-Gg: ASbGncsPBiqXi1Dindp4S3XJE171XIJre/n8FzwdiRbDH7wJ66EkLH4WW55qvqEKNdN nqoxp+C+rHVOvhtTSdv9Z8FDZ4pCXRuqKLoFjaaMg91BCrSCIiCGh7jdfhT+4lJ4FRcoFJYHaWU Ovxyb1dhSAGdTtcJmQEw9SiHmpfDuuZ80O9azZGwxIgXcnGoWcJqG2nF+ifb9yONdeF0ZCwTndz fdI7VT8ZEp/OYebhvpAwvTrrdWrdtC5YKUvWImBRFbLY20IuWSMZdE5+4BeA2UC75+17Fb/4awT X-Google-Smtp-Source: AGHT+IGr8EPMoYS6ojw5A3ofKvxpM7xUBvhhB3EE/EjmdP5u/YaErUeKV4sYLFEeFD7LmSrghul7hw== X-Received: by 2002:a05:6402:458b:b0:5d2:7396:b0ed with SMTP id 4fb4d7f45d1cf-5d7ee391ce1mr7492906a12.14.1734532355672; Wed, 18 Dec 2024 06:32:35 -0800 (PST) Received: from localhost.localdomain ([88.116.133.170]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aabc71ef8fbsm320019466b.165.2024.12.18.06.32.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Dec 2024 06:32:35 -0800 (PST) Message-ID: <3a2d42ac40a5f7aac315227aab374c693b701781.camel@cybertec.at> Subject: Re: Documentation enancement regarding NULL and operators From: Laurenz Albe To: Luca Dametto , pgsql-general@postgresql.org Date: Wed, 18 Dec 2024 15:32:34 +0100 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.2 (3.54.2-1.fc41) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Sun, 2024-12-15 at 17:35 +0000, Luca Dametto wrote: > Most programming languages return "true" when two null values are compare= d, > and false when, being the two values nullable, one of them is null and th= e > other one isn't.=20 > > [not SQL, however] >=20 > Whilst I'd love to discuss the reasons of this, I understand that it woul= d > be a waste of time for everyone, as we cannot change the status-quo even > if it made sense, as it would break many thousands of projects.=20 >=20 > For that reason, I'd just like to improve the documentation to add at lea= st > a note about "hey, this won't work as you might expect, because it works > in a different way than 99% of programming languages out there.". There are already efforts to improve the documentation concerning NULL: https://commitfest.postgresql.org/51/5086/ If that doesn't cover your case, perhaps you can join the discussion and suggest improvements. Yours, Laurenz Albe