From: | Jonathan Bartlett <johnnyb(at)eskimo(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>, <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Factoring where clauses through UNIONS take 2 |
Date: | 2003-04-25 03:52:32 |
Message-ID: | Pine.GSU.4.44.0304242051580.19310-100000@eskimo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Does this apply to NULLs as well?
Thank you for your extremely prompt, intelligent, and helpful replies.
Jon
On Thu, 24 Apr 2003, Tom Lane wrote:
> I said:
> > In this particular case, since the qual doesn't actually touch the
> > type-converted column, it would have been safe to push down, but the
> > planner doesn't make this test on a per-qual basis: if there are type
> > conversions anywhere in the UNION it just punts.
>
> CVS tip has now had its consciousness raised on this point ;-). Turns
> out that it's not significantly more expensive to apply the test to
> individual vars instead of having a blanket check on the whole query,
> so I fixed it.
>
> Jonathan will still need to put the explicit casts into his view for
> use with 7.3.*, though. He probably should do that anyway, because
> even in 7.4 a restriction on the "type" column would not get pushed
> down as desired if the literals are UNKNOWN type.
>
> regards, tom lane
>
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-04-25 03:57:16 | Re: Factoring where clauses through UNIONS take 2 |
Previous Message | Tom Lane | 2003-04-25 03:08:11 | Re: Solaris |