What would happen if a goalkeeper glued the ball to the crossbar?

No. 3

Adebayor-You-are-the-Ref-001.jpg
If there's one thing I learned from these comics, it's that the answer is always "drop ball"
 
Think the cylindrical shaped ball and post likely wouldn't have enough surface contact for the ball to adequately stick to the post.
And if it was able to, most 1.9m+ tall players would probably be able to jump high enough to head it off the post.