Re: [PATCH] pg_sleep(interval) - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [PATCH] pg_sleep(interval)
Date
Msg-id 520E88BA.8000504@gmx.net
Whole thread Raw
In response to Re: [PATCH] pg_sleep(interval)  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [PATCH] pg_sleep(interval)  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [PATCH] pg_sleep(interval)  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 8/16/13 3:35 PM, Robert Haas wrote:
> On Fri, Aug 16, 2013 at 2:57 PM, Greg Stark <stark@mit.edu> 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.

That example can be used as an argument against almost any kind of
overloading.




pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: pgstat_reset_remove_files ignores its argument
Next
From: Peter Eisentraut
Date:
Subject: Re: pg_ctl initdb takes options, but pg_ctl --help doesn't document them?