Re: [PATCH] pg_sleep(interval)

From: Vik Fearing <vik(dot)fearing(at)dalibo(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] pg_sleep(interval)
Date: 2014-01-31 01:12:20
Message-ID: 52EAF874.6090004@dalibo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 01/30/2014 09:48 PM, Robert Haas wrote:
> On Thu, Oct 17, 2013 at 9:11 AM, Vik Fearing <vik(dot)fearing(at)dalibo(dot)com> wrote:
>> On 10/17/2013 02:42 PM, Robert Haas wrote:
>>> On Thu, Oct 17, 2013 at 8:26 AM, Vik Fearing <vik(dot)fearing(at)dalibo(dot)com> wrote:
>>>> On 10/17/2013 10:03 AM, Fabien COELHO wrote:
>>>>> My guess is that it won't be committed if there is a single "but it
>>>>> might break one code or surprise one user somewhere in the universe",
>>>>> but I wish I'll be proven wrong. IMO, "returned with feedback" on a 1
>>>>> liner is really akin to "rejected".
>>>> 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.
>>> I find that naming relatively elegant. However, you've got to
>>> schema-qualify every function and operator used in the definitions, or
>>> you're creating a search-path security vulnerability.
>>>
>> Good catch. Updated patch attached.
> Committed.

Thanks!

--
Vik

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2014-01-31 01:13:08 Re: jsonb and nested hstore
Previous Message Peter Geoghegan 2014-01-31 01:05:22 Re: Making strxfrm() blobs in indexes work