simple division - Mailing list pgsql-general

From Martin Mueller
Subject simple division
Date
Msg-id 4DEACFC2-E8E3-4C61-805B-56A5F76CB819@northwestern.edu
Whole thread Raw
Responses Re: simple division  ("Joshua D. Drake" <jd@commandprompt.com>)
RE: simple division  (Igor Neyman <ineyman@perceptron.com>)
Re: simple division  (Thomas Kellerer <spam_eater@gmx.net>)
Re: simple division  ("David G. Johnston" <david.g.johnston@gmail.com>)
List 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

 

 

pgsql-general by date:

Previous
From: Jeremy Schneider
Date:
Subject: Re: postgis after pg_upgrade
Next
From: Allan Kamau
Date:
Subject: Geographic coordinate values format conversion to DD (DecimalDegrees) format