Re: Is there a floating-point division function/operator? - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Is there a floating-point division function/operator?
Date
Msg-id 20030122224044.P7070-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Is there a floating-point division function/operator?  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
List pgsql-general
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


pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Perfornamce Q
Next
From: pginfo
Date:
Subject: Re: vacuum problem