Re: MySQL search query is not executing in Postgres DB
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Stark <stark@mit.edu>
Cc: Robert Haas <robertmhaas@gmail.com>, 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-28T17:06:42Z
Lists: pgsql-hackers
Greg Stark <stark@mit.edu> writes: > Perhaps just a warning on CREATE FUNCTION when one of the arguments > doesn't have an implicit cast from the canonical data type of that > hierarchy saying perhaps you should consider using that data type and > let Postgres convert instead of the more specific data type? This might be a good idea if we could write such a test in a principled way, but I'm not seeing how. We don't really have a concept of "canonical data types". Also, right at the moment it's not clear to me whether there are any other cases besides integer literal vs smallint argument. I think that's the only particularly surprising case within the numeric hierarchy --- and for non-numeric types, the literal is generally going to start out "unknown" so the whole problem doesn't arise. I feel uncomfortable trying to invent general-purpose solutions to problems we have only one instance of ... regards, tom lane