Re: [PATCH] pg_sleep(interval)

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

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

True.  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)?

Since the same effect can be had by writing a user-defined SQL function,
I'm a bit inclined to say that the value-added by having this as a
built-in function doesn't justify the risk of breaking existing apps.
It's a close call though, because both the risk and the value-added seem
rather small from here.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: 9.4 regression
Следующее
От: Michael Cronenworth
Дата:
Сообщение: Fix Windows socket error checking for MinGW