Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group