why there is no interval / interval operator?

Started by hubert depesz lubaczewskiover 18 years ago4 messagesgeneral
Jump to latest

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)

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: hubert depesz lubaczewski (#1)
Re: why there is no interval / interval operator?

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

In reply to: Tom Lane (#2)
Re: why there is no interval / interval operator?

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)

#4Pavel Stehule
pavel.stehule@gmail.com
In reply to: hubert depesz lubaczewski (#1)
Re: why there is no interval / interval operator?

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

Pavel

Show quoted text

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