Re: MySQL search query is not executing in Postgres DB
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Greg Stark <stark@mit.edu>, Bruce Momjian <bruce@momjian.us>, Andrew Dunstan <andrew@dunslane.net>, Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>, premanand <kottiprem@gmail.com>, pgsql-hackers@postgresql.org
Date: 2012-08-28T18:36:35Z
Lists: 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