psql error processing

It is a happy day when you start working on a new feature and it turns out much better than your original vision. In executing SQL with pgEdit (using psql) I wanted to move the cursor to the first line where an error was found. I got this working but found it unsatisfying because the default in psql is to not stop processing when an error is encountered (you need to \set ON_ERROR_STOP 1 to get this behavior). So to fix the second or third error you would have to jump to the right line reported by psql which might change if you added or removed lines in fixing the first error.

Using editor points provided a nifty way to solve this. A point is something like a location in the editor buffer, but it can be made to "float" as text is added and removed around it rather than representing some absolute offset from the start of the buffer. So pgEdit creates points for each error line and keeps the associated error message along with it. The new Next Error and Previous Error commands allow you to jump to each error location in the buffer and display the associated error message at the bottom of the window. When jumping to the next error, the correct line is located even if fixing previous errors added or removed lines from the file.