adaptations for PostgreSQL