From: Andrew Sullivan <andrew@libertyrms.info>
To: pgsql-performance@postgresql.org
Subject: Re: Implicit casting and JOIN syntax constraints
Date: Fri, 17 Jan 2003 10:41:10 -0500
Message-ID: <20030117104110.G23422@mail.libertyrms.com> (raw)
In-Reply-To: <9B1C77393DED0D4B9DAA1AA1742942DA0E4C0B@pos_pdc.posportal.com>
References: <9B1C77393DED0D4B9DAA1AA1742942DA0E4C0B@pos_pdc.posportal.com>
On Fri, Jan 17, 2003 at 06:48:28AM -0800, Roman Fail wrote:
> It seems to me that this should absolutely go on the TODO list.
> Why does the planner require an explicit cast when the implicit
> cast is so obvious? Does Oracle do this? I can assure you that
> MSSQL does not.
The reason it happens is because of the flexible datatype system in
PostgreSQL. Because it's easy to add a datatype, you pay in other
ways. The problem is coming up with a nice, clean set of rules for
coercion. See the link that Tom Lane posted, and the thousands of
other discussions around this in the archives. Yes, it's a pain.
Everyone knows that. A complete solution is what's missing.
> too. I've been writing SQL queries for 10 years in FoxPro, Access,
> SQL Server, MySQL, and Sybase. I have never come across this very
> confusing "feature" until now.
Well, there are differences between every system. Indeed, the "SQL"
of MySQL is so far from anything resembling the standard that one
could argue it doesn't comply at all. You're right that it means a
steep learning curve for some things, and the problems can be
frustrating. But that doesn't mean you want to throw the baby out
with the bathwater. The ability to give the planner hints through
the JOIN syntax is, frankly, a real help when you're faced with
certain kinds of performance problems. Some systems don't give you a
knob to tune there at all. Is it different from other systems?
Sure. Is that automatically a reason to pitch the feature? No.
(Further discussion of this probably belongs on -general, if
anywhere, by the way.)
A
----
Andrew Sullivan 204-4141 Yonge Street
Liberty RMS Toronto, Ontario Canada
<andrew@libertyrms.info> M2P 2A8
+1 416 646 3304 x110
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-performance@postgresql.org
Cc: andrew@libertyrms.info
Subject: Re: Implicit casting and JOIN syntax constraints
In-Reply-To: <20030117104110.G23422@mail.libertyrms.com>
References: <9B1C77393DED0D4B9DAA1AA1742942DA0E4C0B@pos_pdc.posportal.com> <20030117104110.G23422@mail.libertyrms.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