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

From Peter Eisentraut
Subject Re: [PATCH] pg_sleep(interval)
Date
Msg-id 52179C1D.5090005@gmx.net
Whole thread Raw
In response to Re: [PATCH] pg_sleep(interval)  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCH] pg_sleep(interval)  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-hackers
On 8/16/13 7:52 PM, Tom Lane wrote:
> I think the gripe here is that pg_sleep('42') has worked for
> many releases now, and if we add this patch then it would suddenly
> stop working.  How common is that usage likely to be (probably not
> very), and how useful is it to have a version of pg_sleep that
> takes an interval (probably also not very)?

I think it's always going to be a problem going from a function with
only one signature to more than one.  It's not going to be a problem
going from two to more.

For example, if you had foo(point) and much later you want to add
foo(box), someone might complain that foo('(1,2)') has worked for many
releases now, and how common is that use?  If we had started out with
foo(point) and foo(line) simultaneously, this wouldn't have become a
problem.

This is quite a silly situation.  I don't know a good answer, except
either ignoring the problem or requiring that any new function has at
least two overloaded variants. ;-)




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_system_identifier()
Next
From: Josh Berkus
Date:
Subject: Re: PL/pgSQL PERFORM with CTE