From: Tom Lane <tgl@sss.pgh.pa.us>
To: wieck@debis.com
Cc: mjnf@uevora.pt
Cc: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Wierd stuff
Date: Fri, 03 Dec 1999 18:00:32 -0500
Message-ID: <3254.944262032@sss.pgh.pa.us> (raw)
In-Reply-To: <m11tveG-0003kGC@orion.SAPserv.Hamburg.dsh.de>
wieck@debis.com (Jan Wieck) writes:
> Mario Filipe wrote:
>>>> | concelho_naturalidade | int2
>>>> ...
>>>> | codigo | int4
>>>>
>>>> The field "concelho_naturalidade" on the first table has values taken
>>>> from the "codigo" field from the second.
> First of all, why aren't the two fields of the same data
> type? Shouldn't cause your problem, but it's bad database
> design anyway IMHO.
Actually, I think that this may indeed be the root of the problem.
I killed several bugs in cross-data-type joins a while back ... for
example, IIRC pre-6.5 Postgres thought it could use hash joins for
cross-data-type equality operators, but that doesn't work properly in
general. Mario, what does EXPLAIN show about how the join query is
being done?
If I'm right about this, then upgrading to 6.5.* should fix the problem.
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 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-sql@postgresql.org
Cc: tgl@sss.pgh.pa.us, wieck@debis.com, mjnf@uevora.pt
Subject: Re: [SQL] Wierd stuff
In-Reply-To: <3254.944262032@sss.pgh.pa.us>
References: <m11tveG-0003kGC@orion.SAPserv.Hamburg.dsh.de> <3254.944262032@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