Re: TODO-item: Add sleep() function, remove from regress.c - Mailing list pgsql-patches

From Joachim Wieland
Subject Re: TODO-item: Add sleep() function, remove from regress.c
Date
Msg-id 20060110103113.GA2492@mcknight.de
Whole thread Raw
In response to Re: TODO-item: Add sleep() function, remove from regress.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: TODO-item: Add sleep() function, remove from regress.c
Re: TODO-item: Add sleep() function, remove from regress.c
Re: TODO-item: Add sleep() function, remove from regress.c
List pgsql-patches
On Mon, Jan 09, 2006 at 08:50:36PM -0500, Tom Lane wrote:
> pg_sleep seems like a better idea to me too.

ok, renamed again.

> Why is the function defined to take numeric rather than float8?
> float8 is a whole lot easier to work with internally.

ok, changed.

> The proposed regression test seems unacceptably fragile, as well as
> rather pointless.

Why is it fragile? Which other regression test do you suggest? Or should it
go without one?


On Mon, Jan 09, 2006 at 08:54:49PM -0500, Tom Lane wrote:
> BTW, a serious problem with just passing it off to pg_usleep like that
> is that the sleep can't be aborted by a cancel request

No, cancelling the sleep works (at least for Unix). Isn't cancelling
implemented via a signal that interrupts select() ?

Anyway, I've changed it, removing the ~2000s limit is a good point.


I append a new version with the regression test ripped out.


Joachim


Attachment

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Inconsistent syntax in GRANT
Next
From: Tom Lane
Date:
Subject: Re: TODO-item: Add sleep() function, remove from regress.c