pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bill MacArthur <webmaster@dhs-club.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7604: adding criteria to a query against a view in 9.2 expands the results instead of constraining them
Date: Mon, 15 Oct 2012 15:01:44 -0400
Message-ID: <2890.1350327704@sss.pgh.pa.us> (raw)
In-Reply-To: <507C5A71.50807@dhs-club.com>
References: <E1TNn6X-0003vO-1x@wrigleys.postgresql.org>
	<13773.1350317896@sss.pgh.pa.us>
	<507C53F3.70606@dhs-club.com>
	<29762.1350325783@sss.pgh.pa.us>
	<507C5A71.50807@dhs-club.com>

Bill MacArthur <webmaster@dhs-club.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




view thread (6+ messages)

Message-ID: <2890.1350327704@sss.pgh.pa.us>
Permalink:  ../2890.1350327704@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2890.1350327704@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, webmaster@dhs-club.com
  Subject: Re: BUG #7604: adding criteria to a query against a view in 9.2 expands the results instead of constraining them
  In-Reply-To: <2890.1350327704@sss.pgh.pa.us>
  References: <E1TNn6X-0003vO-1x@wrigleys.postgresql.org> <13773.1350317896@sss.pgh.pa.us> <507C53F3.70606@dhs-club.com> <29762.1350325783@sss.pgh.pa.us> <507C5A71.50807@dhs-club.com> <2890.1350327704@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox