Fixed so psql query should return numeric value.