| From: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
|---|---|
| To: | Robert Haas <robertmhaas(at)gmail(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net> |
| Cc: | Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, PG Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: [PATCH] pg_sleep(interval) |
| Date: | 2013-10-16 20:34:08 |
| Message-ID: | 1381955648.63633.YahooMailNeo@web162903.mail.bf1.yahoo.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> Anyone who actually wants this in their environment can
> add the overloaded function in their environment with a one-line SQL
> function: pg_sleep(interval) as proposed here is just
> pg_sleep(extract(epoch from now() + $1) - extract(epoch from now())).
You're making it sound way harder than it is. Why not just:
create function my_sleep(delay interval)
returns void language sql
as 'select pg_sleep(extract(epoch from $1))';
... or, of course, named to match the existing function.
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andres Freund | 2013-10-16 20:37:39 | Re: removing old ports and architectures |
| Previous Message | Bruce Momjian | 2013-10-16 20:30:56 | Re: Auto-tuning work_mem and maintenance_work_mem |