Thread: why there is no interval / interval operator?

why there is no interval / interval operator?

From
hubert depesz lubaczewski
Date:
is it just a simple ommission, or am i missing something?

we have interval / float8 ( = interval), so i think that adding interval
/ interval ( = float8) should be possible.

depesz

--
quicksil1er: "postgres is excellent, but like any DB it requires a
highly paid DBA.  here's my CV!" :)
http://www.depesz.com/ - blog dla ciebie (i moje CV)

Re: why there is no interval / interval operator?

From
Tom Lane
Date:
hubert depesz lubaczewski <depesz@depesz.com> writes:
> we have interval / float8 ( = interval), so i think that adding interval
> / interval ( = float8) should be possible.

What would you define it to mean, keeping in mind that an interval
has three components not one?

            regards, tom lane

Re: why there is no interval / interval operator?

From
hubert depesz lubaczewski
Date:
On Thu, Nov 08, 2007 at 10:50:39AM -0500, Tom Lane wrote:
> hubert depesz lubaczewski <depesz@depesz.com> writes:
> > we have interval / float8 ( = interval), so i think that adding interval
> > / interval ( = float8) should be possible.
> What would you define it to mean, keeping in mind that an interval
> has three components not one?

ah. so i did overlook something :)

what 3 components, and what are the edge cases that it has to handle?

depesz

--
quicksil1er: "postgres is excellent, but like any DB it requires a
highly paid DBA.  here's my CV!" :)
http://www.depesz.com/ - blog dla ciebie (i moje CV)

Re: why there is no interval / interval operator?

From
"Pavel Stehule"
Date:
one possible implementation
http://www.pgsql.cz/index.php/PL/pgSQL_%28en%29#Usage_of_PL.2FpgSQL_functions_for_designing_own_operators

Pavel

On 08/11/2007, hubert depesz lubaczewski <depesz@depesz.com> wrote:
> is it just a simple ommission, or am i missing something?
>
> we have interval / float8 ( = interval), so i think that adding interval
> / interval ( = float8) should be possible.
>
> depesz
>
> --
> quicksil1er: "postgres is excellent, but like any DB it requires a
> highly paid DBA.  here's my CV!" :)
> http://www.depesz.com/ - blog dla ciebie (i moje CV)
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match
>