a very primitive question about division - Mailing list pgsql-general

From Martin Mueller
Subject a very primitive question about division
Date
Msg-id 411898BB-F429-4654-88B6-F172185DB096@northwestern.edu
Whole thread Raw
Responses Re: a very primitive question about division  ("David G. Johnston" <david.g.johnston@gmail.com>)
List 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.

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Help troubleshooting SubtransControlLock problems
Next
From: "David G. Johnston"
Date:
Subject: Re: a very primitive question about division