BUG #5227: please add a divide operator for intervals

From: "Michal Pasternak" <michal(dot)dtz(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #5227: please add a divide operator for intervals
Date: 2009-12-02 22:31:37
Message-ID: 200912022231.nB2MVbgW021757@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 5227
Logged by: Michal Pasternak
Email address: michal(dot)dtz(at)gmail(dot)com
PostgreSQL version: 8.4
Operating system: doesn't matter
Description: please add a divide operator for intervals
Details:

Please add a divide operator for INTERVAL type, if possible.

db=# SELECT '15 seconds'::INTERVAL / '15 seconds'::INTERVAL;
ERROR: operator does not exist: interval / interval
LINE 1: SELECT '15 seconds'::INTERVAL / '15 seconds'::INTERVAL;
^
HINT: No operator matches the given name and argument type(s). You might
need to add explicit type casts.

db=# SELECT EXTRACT(EPOCH FROM '15 seconds'::INTERVAL) / EXTRACT(EPOCH FROM
'15 seconds'::INTERVAL);
?column?
----------
1
(1 row)

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2009-12-02 23:39:44 Re: BUG #5225: create table: cast necessary for constant??
Previous Message Tom Lane 2009-12-02 21:59:50 Re: Assertion failure with a subtransaction and cursor