Complete conversion to PostgreSQL