A lightning talk I did at PGDay UK 2017 (I think) of a war story from stored functions going a little wrong.

Slides: