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 18:29:43 |
Message-ID: | 29762.1350325783@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:
> Tom, in preparation for a test case I created a new schema (testcase) and copied 6 tables to that, including only the columns significant to enable the VIEWs to be created. I took the 3 VIEWs involved and tweaked them into the new schema (just renamed to testcase.viewname and referencing testcase.relation). However, when run from in there, the results are as expected rather than erroneous. The live data and VIEWs still produce erroneous results. Any clues??
Is the query plan the same according to EXPLAIN?
If not, you may have forgotten to vacuum/analyze the new tables, or
forgotten some relevant index. Or it might be that the total table size
is affecting the plan choice, in which case you need dummy data in the
"irrelevant" columns rather than removing them altogether.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next 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 |
Previous Message | Bill MacArthur | 2012-10-15 18:20:35 | Re: BUG #7604: adding criteria to a query against a view in 9.2 expands the results instead of constraining them |