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

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Is there a floating-point division function/operator?
Date: 2003-01-23 06:41:41
Message-ID: 20030122224044.P7070-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Zeeshan Anwar 2003-01-23 07:01:06 Query
Previous Message Stephan Szabo 2003-01-23 06:40:30 Re: Perfornamce Q