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

From: Bill MacArthur <webmaster(at)dhs-club(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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:20:35
Message-ID: 507C53F3.70606@dhs-club.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 10/15/2012 12:18 PM, Tom Lane wrote:
> webmaster(at)dhs-club(dot)com writes:
>> vip_declines_mailers_base is another VIEW that merely adds some criteria to
>> limit the result set of the 'base' VIEW. In versions 9.0 and back it did
>> just that. After upgrading to 9.2, the criteria actually expand the result
>> set.
>
> This doesn't seem to match any of the known bugs in 9.2, so I'm afraid
> there's no help for it: you need to create a self-contained test case.
>
> regards, tom lane
>

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??

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2012-10-15 18:29:43 Re: BUG #7604: adding criteria to a query against a view in 9.2 expands the results instead of constraining them
Previous Message Joshua D. Drake 2012-10-15 17:18:55 Re: WebSphere Application Server support for postgres