Fixes problem of queries on datatype number in postgres.

Fixes https://github.com/geddy/model/issues/191