Re: [PATCH] pg_sleep(interval)

Поиск
Список
Период
Сортировка
От Fabien COELHO
Тема Re: [PATCH] pg_sleep(interval)
Дата
Msg-id alpine.DEB.2.02.1310171532000.10513@sto
обсуждение исходный текст
Ответ на Re: [PATCH] pg_sleep(interval)  (Vik Fearing <vik.fearing@dalibo.com>)
Список pgsql-hackers
Hello Vik,

> I have attached here an entirely new patch (new documentation and
> everything) that should please everyone.  It no longer overloads
> pg_sleep(double precision) but instead add two new functions:
>
> * pg_sleep_for(interval)
> * pg_sleep_until(timestamp with time zone)
>
> Because it's no longer overloading the original pg_sleep, Robert's
> ambiguity objection is no more.
>
> Also, I like how it reads aloud: SELECT pg_sleep_for('5 minutes');
>
> If people like this, I'll reject the current patch and add this one to
> the next commitfest.
>
> Opinions?

I liked overloading...

Anyway, I have not looked at the patch in details, but both functions 
seems useful at least if you need to sleep, and the solution is 
reasonable.

I also like "pg_sleep_until('tomorrow');" that I guess would work, but I'm 
not sure of any practical use case for this one. Do you have an example 
where it makes sense?

-- 
Fabien.



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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: [PATCH] hstore_to_json: empty hstores must return empty json objects
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [PATCH] pg_sleep(interval)