simple division

From: Martin Mueller <martinmueller(at)northwestern(dot)edu>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: simple division
Date: 2018-12-04 20:29:38
Message-ID: 4DEACFC2-E8E3-4C61-805B-56A5F76CB819@northwestern.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have asked this question before and apologize for not remembering it. How do you do simple division in postgres and get 10/4 with decimals?

This involves cast and numeric in odd ways that are not well explained in the documentation. For instance, you’d expect an example in the Mathematical Functions. But there isn’t.

The documentation of string functions is exemplary. The documentation of mathematical less so. Remember that it may be used by folks like me whose math is shaky. The MySQL documentation is better on this simple operation.

-----
Martin Mueller
Professor emeritus of English and Classics
Northwestern University

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Allan Kamau 2018-12-04 20:36:03 Geographic coordinate values format conversion to DD (Decimal Degrees) format
Previous Message Jeremy Schneider 2018-12-04 18:41:40 Re: postgis after pg_upgrade