From: Nick Fankhauser <nickf@ontko.com>
To: Josh Berkus <josh@agliodbs.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PGSQL-SQL <pgsql-sql@postgresql.org>
Subject: Re: RIGHT JOIN is only supported with mergejoinable join conditions
Date: Wed, 7 Nov 2001 17:22:13 -0500
Message-ID: <NEBBLAAHGLEEPCGOBHDGEEEGDOAA.nickf@ontko.com> (raw)
In-Reply-To: <5788.1005159968@sss.pgh.pa.us>
Tom, Josh:
Thanks for the ideas! Tom's idea was the easiest to test, so I tried it
first, and it worked! As you surmised, there was a typo, so I removed the
extra "sub".
I agree that this still may be a bug. These tables have been migrated
forward from an older postgresql version & hence have no primary or foreign
key constraints that might tip off the planner about my typo - as far as the
database knows, these are just two varchar fields in separate tables. Your
thought about the overlap causing the problem seems likely since this seems
to be a valid query, even with the typo.
At any rate, my immediate problem is solved & I'm a happy camper!
Thanks.
-Nick
--------------------------------------------------------------------------
Nick Fankhauser nickf@ontko.com Phone 1.765.935.4283 Fax 1.765.962.9788
Ray Ontko & Co. Software Consulting Services http://www.ontko.com/> -----Original Message-----
> From: pgsql-sql-owner@postgresql.org
> [mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Tom Lane
> Sent: Wednesday, November 07, 2001 2:06 PM
> To: nickf@ontko.com
> Cc: PGSQL-SQL
> Subject: Re: [SQL] RIGHT JOIN is only supported with mergejoinable join
> conditions
>
>
> "Nick Fankhauser" <nickf@ontko.com> writes:
> > and
> > (
> > local_case_type.local_case_subtype_code =
> > case_data.local_case_type_code
> > )
>
> Did you actually mean to match local_case_subtype_code against
> local_case_type_code, or is that a typo?
>
> I believe you have uncovered a planner bug, but the bug may be triggered
> by the partial overlap of this join condition with the next one.
> Assuming that it's a typo, you may find that you avoid the problem by
> fixing the typo.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
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: nickf@ontko.com, josh@agliodbs.com, tgl@sss.pgh.pa.us
Subject: Re: RIGHT JOIN is only supported with mergejoinable join conditions
In-Reply-To: <NEBBLAAHGLEEPCGOBHDGEEEGDOAA.nickf@ontko.com>
* 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