Thread: Is there a floating-point division function/operator?

Is there a floating-point division function/operator?

From
Jean-Christian Imbeault
Date:
In Postgresql the "/" operator does integer division. Is there an
operator or function that will do floating-point division?

I looked through the iDocs but there was no mention of such a function.

Thanks,

Jc


Re: Is there a floating-point division function/operator?

From
Stephan Szabo
Date:
On Thu, 23 Jan 2003, Jean-Christian Imbeault wrote:

> In Postgresql the "/" operator does integer division. Is there an
> operator or function that will do floating-point division?

/ does division based on the types of its operands

1/2 -> 0
1::float / 2 -> 0.5