It has been recently observed that the generalized Goldberg-Sachs theorem in general relativity as well as some of its corollaries admit appropriate Riemannian versions. In this paper we use the formalism of spinors to give alternative proofs of these results clarifying the analogy between positive Hermitian structures of oriented Riemannian four-manifolds and shear-free congruences of oriented Lorentzian four-manifolds. We also prove similar results for oriented pseudo-Riemannian four-manifolds when the metric is of zero signature. This allows us to describe compact oriented four-manifolds possibly admitting a pseudo-Riemannian Einstein metric of zero signature whose positive Weyl tensor has two distinct eigenvalues corresponding to non-isotropic eigenspaces.