Fixing PostgreSQL support