Re: Time span conversion function - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Time span conversion function
Date
Msg-id 29707.1105770023@sss.pgh.pa.us
Whole thread Raw
In response to Re: Time span conversion function  (Brendan Jurd <blakjak@blakjak.sytes.net>)
Responses Re: Time span conversion function  (Brendan Jurd <blakjak@blakjak.sytes.net>)
List pgsql-hackers
Brendan Jurd <blakjak@blakjak.sytes.net> writes:
> 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).

This bothers me a bit.  That essentially says that (text, interval)
has a hidden instability: the results depend on when you execute it.

If we allow this form, it should be restricted to only those units
(values of the text parameter) for which the result would *not*
depend on now().
        regards, tom lane


pgsql-hackers by date:

Previous
From: Brendan Jurd
Date:
Subject: Re: Time span conversion function
Next
From: Brendan Jurd
Date:
Subject: Re: Time span conversion function