Re: Subselect with no records results in final empty set

From: John R Pierce <pierce(at)hogranch(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Subselect with no records results in final empty set
Date: 2015-01-29 20:52:25
Message-ID: 54CA9D89.2040502@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 1/29/2015 12:36 PM, Sterpu Victor wrote:
>
> ON(null) never matched.

NULL is neither true nor false.

ON somefieldinthejoin IS NULL would be a valid syntax. except,
that's NOT a join condition, a join condition would be ON
left_table.something = right_table.something

> ON (1=1)

equivalent to ON TRUE

but that will cross join everything, so if the left table has N rows
and the right table has M rows, you'll end up with N*M rows in the
result. is that really what you want ??

--
john r pierce 37N 122W
somewhere on the middle of the left coast

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Day, David 2015-01-29 20:54:39 Re: segmentation fault postgres 9.3.5 core dump perlu related ?
Previous Message David Johnston 2015-01-29 20:39:14 Re: Subselect with no records results in final empty set