Fixed Postgres compatibility