Water? No.
FIRE!
Use a flamethrower.
You can even use it in a non-lethal form.
You shoot the flame so it hits the fence (assuming non-flammable construction) to get it really hot. Do this before anyone is on the fence. Periodically sweep the fence with flame (random timer). The fence will be way too hot for anyone to climb.
Now if someone wants to “end it all” via the flame fence, that’s their problem.
Works for me. Though, perhaps, water would have better optics for the squeamish.