Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
knightni
· 12y ago · 0 comments
You're running into the fact that Postgres doesn't automatically cast ints to floats - so 1/50 = 0. Try using 1.0/50.0 instead.
Comments
[–]
SDGT
12y ago
Or get dirty and cast it.
::floatval