a very primitive question about division

Martin Mueller <martinmueller@northwestern.edu>

From: Martin Mueller <martinmueller@northwestern.edu>
To: "pgsql-general@lists.postgresql.org" <pgsql-general@lists.postgresql.org>
Date: 2018-03-07T17:21:12Z
Lists: pgsql-general
I have a very primitive question about division to which I can’t find an obvious answer in the documentation.

Given two values defined as integers, how do I divide one by the other and get an answer with two decimals, e.g 3 /4 = 0.75.

This is very simple in mysql and seems to be oddly contorted in postgres. I spent half an hour on the Web and with the documentation but couldn’t find a simple example.

Probably my stupidity.