In 3rd edition of Goldstein's "Classical Mechanics" book, page 335, section 8.1, it is mentioned that : In Hamiltonian formulation, there can be no constraint equations among the co-ordinates. Why is this necessary ? Any simple example which will elaborate this fact ? But in Lagrangian formulation, there can be constraint equations. Then why not in Hamiltonian formulation ?