added condition for postgres(2)