Andrew Hammond <andrew(dot)george(dot)hammond(at)gmail(dot)com> writes:
> Yet another potential addition to the family of operators. Some guy
> was asking for it on IRC so...
> CREATE OR REPLACE FUNCTION interval_over_interval(interval, interval)
> RETURNS float STRICT IMMUTABLE LANGUAGE sql AS $$
> SELECT extract(epoch from $1)::float / extract(epoch from $2);
> $$;
What are the grounds for defining it that way rather than some other
way?
regards, tom lane