Re: Time span conversion function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Brendan Jurd <blakjak(at)blakjak(dot)sytes(dot)net>
Cc: Kris Jurka <books(at)ejurka(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Time span conversion function
Date: 2005-01-15 06:20:23
Message-ID: 29707.1105770023@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Brendan Jurd <blakjak(at)blakjak(dot)sytes(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Brendan Jurd 2005-01-15 06:25:41 Re: Time span conversion function
Previous Message Bruce Momjian 2005-01-15 06:01:35 On schedule for 8.0.0 packaging on Monday