A while ago I’ve been fixing and publishing pgsql-linum-format separately. That allows to number PL/whatever code lines when editing from Emacs, and it’s something very useful to turn on when debugging.

The carrets on the fringe in the emacs window are the result of (setq-default indicate-buffer-boundaries 'left) and here it’s just overloading the image somehow. But the idea is to just M-x linum-mode when you need it, at least that’s my usage of it.

You can use el-get to easily get (then update) this little Emacs extension.