Re: [PATCH] pg_sleep(interval)

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Greg Stark <stark(at)mit(dot)edu>, Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] pg_sleep(interval)
Date: 2013-08-23 17:30:05
Message-ID: 52179C1D.5090005@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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. ;-)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2013-08-23 17:51:10 Re: PL/pgSQL PERFORM with CTE
Previous Message Tom Lane 2013-08-23 16:36:31 Re: pg_system_identifier()