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

From Tom Lane
Subject Re: TODO-item: Add sleep() function, remove from regress.c
Date
Msg-id 23891.1136857836@sss.pgh.pa.us
Whole thread Raw
In response to TODO-item: Add sleep() function, remove from regress.c  (Joachim Wieland <joe@mcknight.de>)
Responses Re: TODO-item: Add sleep() function, remove from regress.c
List pgsql-patches
Joachim Wieland <joe@mcknight.de> writes:
> I'd personally prefer to call the function pg_sleep(), but since it is
> called sleep() on the TODO list and in previous discussions, I kept the
> name. The internal function is called pg_sleep() however.

pg_sleep seems like a better idea to me too.

Why is the function defined to take numeric rather than float8?
float8 is a whole lot easier to work with internally.  (Performance
doesn't seem like an issue here, but length and readability of the code
are worth worrying about.)  Further, you could avoid assuming that the
machine has working int64 arithmetic, which is an assumption I still
think we should avoid everywhere that it's not absolutely essential.

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

            regards, tom lane

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