I think it is worth distinguishing more clearly between portals that should be displayed to the user and those that should not (which might be labelled "internal cursors", perhaps). The tests above seem fairly ad-hoc.
With all this system view love going on, is there any point having a 'pg_savepoints' view to see what savepoints you've made?
Chris ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster