On Fri, Aug 16, 2013 at 2:57 PM, Greg Stark wrote:
Except there are no data types that can be cast to both double and
interval currently.
That, unfortunately, is not sufficient to avoid a problem.

rhaas=# create or replace function foo(double precision) returns
double precision as $$select $1$$ language sql;
CREATE FUNCTION
rhaas=# create or replace function foo(interval) returns interval as
$$select $1$$ language sql;
CREATE FUNCTION
rhaas=# select foo('123');
ERROR: function foo(unknown) is not unique
LINE 1: select foo('123');
                ^
HINT: Could not choose a best candidate function. You might need to
add explicit type casts.
rhaas=#

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

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 6 of 16 | next ›
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedAug 8, '13 at 11:52a
activeAug 23, '13 at 7:55p
posts16
users9
websitepostgresql.org...
irc#postgresql

People

Translate

site design / logo © 2017 Grokbase