We consider two different interpretations of the Chu--Vandermonde identity: as an identity for polynomials, and as an identity for infinite matrices. Each interpretation leads to a class of possible generalizations, and in both cases we obtain a complete characterization of the solutions