On 21/06/10 17:08, Tom Lane wrote:
I suspect you need to pstrdup() the portalname.
Yes, you're right. Thanks.
Also, isn't exec_for_query() at just as much risk? The latter's problem would only be exposed if the cursor was closed at a batch boundary, but it's still a problem.
Can you elaborate? I thought I fixed exec_for_query(). (except for the missing pstrdup).
I wonder whether we ought to try to make it an error to close a portal that's still in use.
I think it's fine as it is. FWIW what we do now matches Oracle. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs