From: SourceForge.net <no...@so...> - 2003-03-07 06:48:30
|
Bugs item #698981, was opened at 2003-03-06 15:56 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116528&aid=698981&group_id=16528 Category: PgSQL Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Phil Gregory (phil_g) >Assigned to: Billy G. Allie (ballie01) Summary: Does not quote portal names to close them properly Initial Comment: When PyPgSQL opens and uses portals, the SQL statements use mixed-case names for the portals, placing them in double quotes. However, when the portals are closed the double quotes are not used, so PostgreSQL treats the names as all lower-case. This leads to lots of open portals being left on the server as well as messages like WARNING: PerformPortalClose: portal "pgsql_08311b04" not found appearing in the logs. Sample session: Python 2.2.2 (#1, Jan 18 2003, 10:18:59) [GCC 3.2.2 20030109 (Debian prerelease)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from pyPgSQL import PgSQL >>> con = PgSQL.connect(host = "aragorn", user = "phil", database = "moobot") >>> con.conn.toggleShowQuery 'On' >>> cursor = con.cursor() QUERY: BEGIN WORK >>> cursor.execute("SELECT * FROM data") QUERY: DECLARE "PgSQL_0818F0AC" CURSOR FOR SELECT * FROM data QUERY: FETCH 1 FROM "PgSQL_0818F0AC" QUERY: SELECT typname, -1 , typelem FROM pg_type WHERE oid = 1043 >>> result = cursor.fetchmany(3) QUERY: FETCH 2 FROM "PgSQL_0818F0AC" >>> con.commit() QUERY: CLOSE PgSQL_0818F0AC QUERY: COMMIT WORK >>> And, from the logs: WARNING: PerformPortalClose: portal "pgsql_0818f0ac" not found Note that the case of the portal name does not match. ---------------------------------------------------------------------- >Comment By: Billy G. Allie (ballie01) Date: 2003-03-07 01:59 Message: Logged In: YES user_id=8500 This problem has already been fixed. You can get PgSQL.py from the CVS repository to obtain the fix for this problem (and others). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116528&aid=698981&group_id=16528 |