Re: Getting non_NULL right-side values on a non-matching join?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com>
Cc: PG-General Mailing List <pgsql-general(at)postgresql(dot)org>, Michael James <mjames(at)plymouthhousing(dot)org>
Subject: Re: Getting non_NULL right-side values on a non-matching join?
Date: 2013-11-22 06:31:45
Message-ID: 16923.1385101905@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com> writes:
> Getting a build environment together seemed more painful, so here's a test
> case.

Wow, that's pretty broken. I'll dig into it tomorrow.

> Just for fun, I tried this in another database on a different
> machine (and with 9.0.08). I got the same results, so it doesn't seem to
> be a case of something wacky with my particular database.

Yeah, seems to fail the same way in all active branches ...

> p.s., Not your problem I know, but I need to deal with this somehow and
> rather soon.

If you just need a work-around-it-right-now solution, I'd suggest
introducing an "OFFSET 0" optimization fence into one or another of the
levels of view below the outer joins. I've not experimented but I think
that ought to fix it, at some possibly-annoying cost in query
optimization. Hopefully I'll have another answer tomorrow.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Joseph Krogh 2013-11-22 10:41:18 Performance of Blobs, LargeObject
Previous Message Ken Tanzer 2013-11-22 04:59:08 Re: Getting non_NULL right-side values on a non-matching join?