added pgsql and fix