I just moved my application from MySQL to Postgres. Previously, a query for .all returned all rows in id order. In Postgres, strings are returned. Similarly
Person.first
used to return a record with identifier 1, now it sometimes returns another record.
If I add an order clause as follows:
Person.order("id").first
The request succeeds and returns the first row. Is this expected behavior?
source share