On Wed, Oct 16, 2013 at 4:34 PM, Kevin Grittner <kgri...@ymail.com> wrote: > Robert Haas <robertmh...@gmail.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.
Because that might or might not do the right thing if the interval is 1 month. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers