Re: [PATCH] pg_sleep(interval) - Mailing list pgsql-hackers

From Josh Berkus
Subject Re: [PATCH] pg_sleep(interval)
Date
Msg-id 520EC584.3050805@agliodbs.com
Whole thread Raw
In response to [PATCH] pg_sleep(interval)  (Vik Fearing <vik.fearing@dalibo.com>)
Responses Re: [PATCH] pg_sleep(interval)  (Stephen Frost <sfrost@snowman.net>)
List pgsql-hackers
On 08/16/2013 05:15 PM, Tom Lane wrote:
> Josh Berkus <josh@agliodbs.com> writes:
>> Why not just call it pg_sleep_int()?
> 
> To me, that looks like something that would take an int.  I suppose you
> could call it pg_sleep_interval(), but that's getting pretty verbose.
> 
> The larger picture here though is that that's ugly as sin; it just flies
> in the face of the fact that PG *does* have function overloading and we
> do normally use it, not invent randomly-different function names to avoid
> using it.  We should either decide that this feature is worth the small
> risk of breakage, or reject it.  Not build a camel-designed-by-committee
> because no one would speak up for consistency of design.

Well, if that's the alternative, I'd vote for taking it.  For me,
personally, I think the usefulness of it would outstrip the number of
functions I'd have to debug.

For one thing, it's not like pg_sleep is exactly widely used, especially
not from languages like PHP which tend to treat every variable as a
string.  So this is not going to be the kind of upgrade bomb that
pg_size_pretty was.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] pg_sleep(interval)
Next
From: Noah Misch
Date:
Subject: Re: Fix Windows socket error checking for MinGW