This isn't the one I saw on TV, but at least it does mention grease.

That coupled with the ship going at full speed and zigzagging and water cannons, barbed wire and grease and various other bits and pieces on the back of the ship all basically amount to a fairly effective deterrent for what is basically from the pirate's capabilities a fairly primitive way of boarding, i.e., throwing a grappling hook onto the back of the ship and climbing up a rope ladder.
One source - on 1st page, 1st question.