Re: [PATCH] pg_sleep(interval)

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: [PATCH] pg_sleep(interval)
Дата
Msg-id 52179C1D.5090005@gmx.net
обсуждение исходный текст
Ответ на Re: [PATCH] pg_sleep(interval)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCH] pg_sleep(interval)  (Fabien COELHO <coelho@cri.ensmp.fr>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: pg_system_identifier()
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: PL/pgSQL PERFORM with CTE