One would think! I tracked the issue to the `sql-redirect-one' function, which is responsible for re-populating the buffer. Unfortunately I wasn't able to fix the problem for myself.
I tested including an (inhibit-read-only t) in the opening let form, but still no joy. Seems the call to `comint-redirect-send-command-to-process' redirects output to the target buffer then calls `process-send-string' (shocking, I know) and that *latter* call gives the same error.
I don't know nearly enough about Emacs, but my current best guess is that `process-send-string' just won't respect `inhibit-read-only' because the former's a built-in C function. Right now I'm trying to figure out how best to manage the read-only status on the buffer (I'm really new to the nuances of view-mode and toggling the read-only flag).
Any pointers? Right now I'm just jamming a (read-only-mode -1) and (read-only-mode 1) at the top and bottom of `sql-redirect-one', but it feels too gross to share. I'd love to find out that I can get away with a simple `inhibit-read-only' solution.