From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Lundin <daniel@helena-daniel.se>
Cc: pgsql-sql@postgresql.org
Subject: Re: Again: Identity not discovered by planner?
Date: Thu, 25 Apr 2002 12:57:10 -0400
Message-ID: <2329.1019753830@sss.pgh.pa.us> (raw)
In-Reply-To: <20020425130838.GA1495@shire>
References: <20020425130838.GA1495@shire>
Daniel Lundin <daniel@helena-daniel.se> writes:
> I would have thought that the planner would notice that child.parent =
> parent.id = 1193, implies that child.parent = 1193,
Nope, it does not.
It will notice transitive equality of variables, but that happens to
fall out of processing that it has to do anyway to recognize sort keys
for mergejoins. Constants aren't interesting for join planning so they
are not handled in that code.
Offhand I do not see a way of recognizing this case that wouldn't expend
a great deal more cycles than it's likely to be worth.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, daniel@helena-daniel.se
Subject: Re: Again: Identity not discovered by planner?
In-Reply-To: <2329.1019753830@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