Re: Data type confusion - Mailing list pgsql-sql

From Tom Lane
Subject Re: Data type confusion
Date
Msg-id 7080.997051520@sss.pgh.pa.us
Whole thread Raw
In response to Data type confusion  ("Josh Berkus" <josh@agliodbs.com>)
Responses Re: Data type confusion  ("Josh Berkus" <josh@agliodbs.com>)
List pgsql-sql
"Josh Berkus" <josh@agliodbs.com> writes:
> If
> INTERVAL / INTEGER = INTERVAL

Actually the operator appears to be INTERVAL / FLOAT8.

> then why does
> INTERVAL / INTERVAL = ERROR?

Because no one got around to creating an INTERVAL / INTERVAL operator.
There are plenty of such gaps in our operator set...

> Shouldn't
> INTERVAL / INTERVAL = INTEGER?

I'd think the output should be FLOAT8, myself, since the result
could be fractional.

Anyway, the generic response to such questions is "feel free to
code it up and submit a patch".
        regards, tom lane


pgsql-sql by date:

Previous
From: Allan Engelhardt
Date:
Subject: Re: Data type confusion
Next
From: "Josh Berkus"
Date:
Subject: Re: Data type confusion