Neil Conway <neilc@samurai.com> writes:
> Why list Portals that cannot be directly manipulated by the user?
Define "directly manipulated". AFAIR there isn't any particular
distinction between portals that got made by DECLARE CURSOR and those
that got made by Bind; you can use either EXECUTE or Fetch for either.
Also, a portal that has gone into ERROR state should still be listed,
IMHO, because the behavior the user will expect is that it's there until
he CLOSEs it.
> It would also mean that this would produce unexpected results:
> "PREPARE foo AS SELECT * FROM pg_cursors; EXECUTE foo".
Unexpected in what sense?
regards, tom lane