In my opinion, I see the phrase as a way to keep someone in a place against his will. It might not really be a literal glue, it might be something else instead of a glue. Probably something the person love so much or something that can leave the person in a place for a long time.
"Glue him to the table" implies a person is so focused, engaged, or possibly restrained, that they are unable to move from their seat or position at a table. It suggests intense concentration, interest, or even a feeling of being stuck, unable to disengage. Link
I would not want to think that a literal glue would keep someone in a place, or a table. I would wonder what the person was looking at when his hand was glued. The expression works better for me.
You can also participate by clicking here