Detect PostgreSQL version and abort if incompatible