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 1vT1XE-00Bbxh-2V for pgsql-general@arkaria.postgresql.org; Tue, 09 Dec 2025 17:30:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vT1XC-005ofN-0v for pgsql-general@arkaria.postgresql.org; Tue, 09 Dec 2025 17:29:58 +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 1vT1XB-005ofF-2w for pgsql-general@lists.postgresql.org; Tue, 09 Dec 2025 17:29:58 +0000 Received: from mail-oi1-x231.google.com ([2607:f8b0:4864:20::231]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vT1XA-00454e-0a for pgsql-general@lists.postgresql.org; Tue, 09 Dec 2025 17:29:57 +0000 Received: by mail-oi1-x231.google.com with SMTP id 5614622812f47-44fe6771b2dso1482369b6e.1 for ; Tue, 09 Dec 2025 09:29:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765301394; x=1765906194; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=tjtg/br5rltc2KaFtZOaB8JGiQ8NmoEE3pw3rblv0cA=; b=fZeAberbG4NyT9r9hc77FiNyQpuT7rkVYW5uaNohiSzWJBenNj2/msf9SNyrRni8X1 XIA6d+6kir/LW93SMH2/0SiegEmQ1OTtYx95r7R/+z6fhPTgspcURQguvc+HVZWIqcV2 tBE8yF0rzUIWrFlnXnG3y2aFCu7QxsK4Qu7DqroyhtPkagafyPC/knXfP3vn4VxfZjmn SMSyHBpqwgNV8yk5fahVYQ/FQTx7YaxQPSu0vvwvhBFgQ9rvLgvXDvNFstxT4jmx4uWZ Jj5VuBoKQ3fQKzc8IDJXlnWbKDlaa0l4YYb6tg5UPz4oHHqI6gHqPc0RKDktwKWOrVuZ 41FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765301394; x=1765906194; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=tjtg/br5rltc2KaFtZOaB8JGiQ8NmoEE3pw3rblv0cA=; b=Z/ztjudcFPlDIq27p+QrFjoMlboetFW+uRxrYprXXvDVeofaxGbU4k+MbUv/Xgh0v9 Cf63hrAtE2cMz5CR0+jpk8wB7f5HhUzATuya/WHUeqpVRicMu4LBtTp3Jddoi+q8Csoe rbk0Tbg/OyPuMsN3RwJgmkQFvHYI6G2Oks9LCuDufbk2ZFxobYiwYmBq3MObpOmAk0mw U1QzZYFf5mghHa/xzCmAU3SaSMYrudfpcsLk5wNEAJ/Qmh80T87Qake0ryn55U1pn5vN KKLXUwh2J6VbU3rsWIu6NkcByBbbq0dyvx44qmlg/Pb8q/zTn6a120HzakK0wMevz8eV vcRA== X-Gm-Message-State: AOJu0YwhRulPWgUcqvWVv7qlIgvLGix9+X7hu3ds/901qlEvn+/nICsd vf/xH5f6ABoDrQaq6TFqC5xQ7WRykyiuinCQPGKDCV4pi/RyT9nwabY+9u5ApYAMjKWs2RM+9ln 8xjFTZGbRFIIiajwGOsbnDKnyLvd/urigPVow X-Gm-Gg: ASbGncsKFxfrblqPHYj2CWlqOO1fTFRb+s8103BReUHpnCVf58bycFvfrsxO4mtqKaq 2AMBZQ0mXv0VWF7vLRFYxbRqhQOjy3VQ+lAFSHhSck/prA9CgDjP0dqZ7sJ1gyfPOi+cZKaUyX/ zMmtjetOHFpuRlaRHO1vFY0zKbZwEfbCJaw8AChdKzXdCwt8eOGPlEXGMezTtxs1+rmGSZCHuvU a+UlEsD4DDW9uHgXHOxWLxK5fxmFhP6WRbKzDg+ds0bez8v3BnCtF6oFNBl2goxYF6V9Q== X-Google-Smtp-Source: AGHT+IFFfMUb5jMS3FAnmrx/5mlqM05iO2w3LzlTln+1um1yDgVN9Y/M3jsfRv8s0UbAdjcNw7IUzFlzMeEZvy1ha1g= X-Received: by 2002:a05:6808:c29c:b0:44f:e512:4c90 with SMTP id 5614622812f47-4539dd5727amr3643156b6e.0.1765301393934; Tue, 09 Dec 2025 09:29:53 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: "David G. Johnston" Date: Tue, 9 Dec 2025 10:29:17 -0700 X-Gm-Features: AQt7F2quEF9shy1zsMxcyRrzZNMC5hpkvPC-cjS0b54nL-I1UsKjWKkY-5JBOUc Message-ID: Subject: Re: How do I check for NULL To: Thiemo Kellner Cc: pgsql-general@lists.postgresql.org Content-Type: multipart/alternative; boundary="00000000000081ce7f0645884215" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --00000000000081ce7f0645884215 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Dec 9, 2025 at 10:14=E2=80=AFAM Thiemo Kellner wrote: > I feel, you meant to say, the subquery does not return any record which i= s > not the same as returns NULL. > For a scalar subquery the final output of a zero-row query is the null value. David J. --00000000000081ce7f0645884215 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Dec 9, 2025 at 10:14=E2=80=AFAM Thiemo Kellner <= ;thiemo@gelassene-pferde.biz= > wrote:
=20 =20 =20
I feel, = you meant to say, the subquery does not return any record which is not the = same as returns NULL.

For a scal= ar subquery the final output of a zero-row query is the null value.

David J.

--00000000000081ce7f0645884215--