A wise man has no extensive knowledge; He who has extensive knowledge is not a wise man. [Lao-tzu, "Tao te Ching," c.550 B.C.E.]
Wise guy is attested from 1896, American English. Wisenheimer, with mock German or Yiddish surname suffix, first recorded 1904.