Detect postgresql better