Update SQL queries in message model to work with Postgres