Re: MySQL search query is not executing in Postgres DB - Mailing list pgsql-hackers

From Robert Haas
Subject Re: MySQL search query is not executing in Postgres DB
Date
Msg-id CA+Tgmoa=L6YwMAifGsgX1cbT3DNC+BF=WgtQ6MGy3jstwETH7g@mail.gmail.com
Whole thread Raw
In response to Re: MySQL search query is not executing in Postgres DB  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: MySQL search query is not executing in Postgres DB
List pgsql-hackers
On Tue, Aug 28, 2012 at 1:39 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> The other case that comes up regularly is someone trying to pass some
>> kind of number to a function such as LPAD().  There is only one LPAD()
>> so no ambiguity exists, but PostgreSQL doesn't even see that there's a
>> candidate.
>
> There still won't be a candidate for that one, unless you're proposing
> to allow explicit-only coercions to be applied implicitly.

OK, I'm confused.

rhaas=# create table foo (a text);
CREATE TABLE
rhaas=# insert into foo values (12345);
INSERT 0 1

There are no pg_cast entries for integer -> text, but this still gets
treated as an assignment cast because of some special-case logic in
find_coercion_pathway().

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



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: SP-GiST micro-optimizations
Next
From: Tom Lane
Date:
Subject: Re: SP-GiST micro-optimizations