Kris Jurka wrote:
>On Sat, 15 Jan 2005, Brendan Jurd wrote:
>> > SELECT time_span( 'minute', now(), interval '10:43:55' );
>The timestamp argument to this version of the function seems completely
I don't think so. As I pointed out in the OP, to make this function
work properly you need to define a startpoint and an endpoint. The
version of the function which accepts (text, timestamp, interval)
arguments is really just using another notation to achieve the same
thing - startpoint and endpoint.
The timestamp argument is only irrelevant if you're willing to assume
now() is going to be the startpoint, which is not a fair assumption
IMO. I would rather give the caller the freedom of defining the
startpoint himself, in either notation.
Of course, it would be possible to create a shorthand version of the
function which expects (text, interval), and passes directly to
time_span($1, now(), $2).
Does that resolve your concern? If not please explain it more fully.
In response to
pgsql-hackers by date
|Next:||From: Bruce Momjian||Date: 2005-01-15 06:01:35|
|Subject: On schedule for 8.0.0 packaging on Monday|
|Previous:||From: Alvaro Herrera||Date: 2005-01-15 04:26:07|
|Subject: Re: sparse (static analyzer) report|