Group by float column in postgresql by releu

757fb0d5ec7560b6f25f5bd98eadc020?size=52

If you have same float values in your database you can't group by it.

But you are able to convert it to numeric and round it. For example:

SELECT COUNT(*) AS count_all, lat::float::numeric(9, 6), lng::float::numeric(9, 6) AS lat_float_numeric_9_6_lng_float_numeric_9_6 FROM "locations" GROUP BY lat::float::numeric(9, 6), lng::float::numeric(9, 6)

#sql #postgresql

Tags aliases on gistflow by releu

757fb0d5ec7560b6f25f5bd98eadc020?size=52

After creation wiki we had got a problem: we have a difference tags about one thing. For example: #js and #javascript. This situation is ok because everyone sometimes loves to write short messages and sometimes full.

We solve this problem by determining main tag and linking it with aliases. More under the cut

Gistflow crashes by releu

757fb0d5ec7560b6f25f5bd98eadc020?size=52

Last night we deployed release version and after few hours db had been crashed. In order to prevent it I change db to #postgresql but troubles founds me: #sqlite3 dump is not suitable to pg.

After fix it I had got new problem - unicorns crashes with pg... Few hours later I found a solution and fixed some other bugs.

Seems like all stabilized now.

I hope this history will never repeat.

#gistflow team.