Re: MySQL search query is not executing in Postgres DB

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Greg Stark <stark(at)mit(dot)edu>, Bruce Momjian <bruce(at)momjian(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, premanand <kottiprem(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: MySQL search query is not executing in Postgres DB
Date: 2012-11-27 17:19:43
Message-ID: CA+TgmobXax0-tODdH8ONoQK3AbxUewLM8GUOpFd-Bx0nZc2E2A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 27, 2012 at 4:46 AM, Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> Let's say you have only one function "foo". All your queries are coded
> into your application, and everything works fine, using assignment casts
> where necessary.
>
> Then the user is foolish enough to CREATE FUNCTION foo... and now their
> queries start failing left and right.
>
> In other words, "only one possible candidate exists" should be followed
> by "right now" to be more precise.
>
> That's a major violation of the principle of least astonishment, that
> CREATE FUNCTION could cause such a disaster. I know that it can now, but
> what you're proposing will come into play much more frequently because
> most people start off with just one function by a particular name and
> define more as needed.

I admit that there are cases where this could happen, and that it will
happen a little more than it does now. But, as you say, this can
happen now, and yet we get very few if any complaints about it,
whereas we get regular complaints about the need to insert casts that
other database systems do not require. The fact is that most
functions are not overloaded, so the esoterica of overloading affect
only a tiny number of relatively sophisticated users. The need for
extra casts cuts a much broader swath through our user base.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2012-11-27 17:43:57 Re: Problem Observed in behavior of Create Index Concurrently and Hot Update
Previous Message Robert Haas 2012-11-27 17:11:44 Re: Re: Problem Observed in behavior of Create Index Concurrently and Hot Update