Re: BUG #7604: adding criteria to a query against a view in 9.2 expands the results instead of constraining them

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bill MacArthur <webmaster(at)dhs-club(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #7604: adding criteria to a query against a view in 9.2 expands the results instead of constraining them
Date: 2012-10-15 19:01:44
Message-ID: 2890.1350327704@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Bill MacArthur <webmaster(at)dhs-club(dot)com> writes:
> Update, I started placing primary keys on the testcase tables and watched the planner output. Once I put a PK on one of the tables in particular, the planner revised the plan to use the PK. At that point, the results become erroneous as the planner also moves another filter evaluation to an earlier point at which time I don't think it has the data to make the decision.

Curious ...

> I can still finish up with the test case if you like, but here is a highlight. The first VIEW, which I did not originally post is this:

Test case, please.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2012-10-15 19:27:48 Re: pg_ctl restart issue with relative paths
Previous Message Bill MacArthur 2012-10-15 18:48:17 Re: BUG #7604: adding criteria to a query against a view in 9.2 expands the results instead of constraining them