timespan/2

From: Carlos Fonseca <cmfonsec(at)ualg(dot)pt>
To: pgsql-general(at)postgresql(dot)org
Subject: timespan/2
Date: 1999-01-09 22:59:38
Message-ID: Pine.LNX.3.96.990109221411.8450A-100000@gaivota.localnet
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear all,

I need to compute the half of given timespan values, and was surprised to
see that, e.g., ('1h'::timespan)/2 doesn't work, whereas
('1h'::timespan)/(2::timespan) does. This isn't just inconvenient, it
looks wrong as well: try '1h'::timespan/'0s300ms'::timespan,
when you really mean '1h'::timespan/0.3.

Is this a bug or a design decision? Shouldn't division of two timespan
values return a float, and division of a timespan value by an int/float
return a timespan? I am using postgresql v6.4.2.

Please Cc: any replies to me, as I am not on the list (for now)...

TIA,

Carlos

Browse pgsql-general by date

  From Date Subject
Next Message Jorge del Conde 1999-01-10 00:04:42 Re: mysql: Databases on Linux
Previous Message Michael Wright 1999-01-09 21:51:29 Please help with a Solaris 2.6 build error