The song was originally based on Hilaire Belloc's "Cautionary Tales for Children" (1907). Syd Barrett was forced to re-write the song after Belloc's estate denied permission to use the original lyrics.
The "Belloc version" is only available on bootleg.