The first surviving published version of the rhyme 'Peter, Peter pumpkin eater' dates back to 1797, but the origins could be older.
'Peter, Peter pumpkin eater' lyrics
Peter, Peter pumpkin eater, Had a wife but couldn't keep her; He put her in a pumpkin shell And there he kept her very well.
Peter, Peter pumpkin eater, Had another and didn't love her; Peter learned to read and spell, And then he loved her very well