| From: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
|---|---|
| To: | Vik Fearing <vik(dot)fearing(at)dalibo(dot)com> |
| Cc: | PG Hackers <pgsql-hackers(at)postgresql(dot)org>, Josh Berkus <josh(at)agliodbs(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com> |
| Subject: | Re: [PATCH] pg_sleep(interval) |
| Date: | 2013-10-17 13:37:34 |
| Message-ID: | alpine.DEB.2.02.1310171532000.10513@sto |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2013-10-17 13:51:51 | Re: [PATCH] pg_sleep(interval) |
| Previous Message | Andrew Dunstan | 2013-10-17 13:33:20 | Re: [PATCH] hstore_to_json: empty hstores must return empty json objects |