Re: v 2.3 warning messages

"Billy G. Allie" <[email protected]>
Newsgroups gmane.comp.python.db.pypgsql.user
Message-ID <[email protected]>
Gerhard Haering wrote:
> * Michael Engelhart <[email protected]> [2002-12-22 17:48 -0500]:
> > Hi -
> > i'm running pyPgSQL 2.3 on Mac OS X 10.2.2, PostgreSQL 7.3, and  Python 
> > 2.2
> > 
> > When doing any SELECT, UPDATE, INSERT or DELETE operations on the 
> > database I get the following database warning errors:
> > 
> > WARNING:  PerformPortalClose: portal "pgsql_0061be10" not found
> > WARNING:  Closing pre-existing portal "PgSQL_0061BE10"
> > WARNING:  PerformPortalClose: portal "pgsql_0061be10" not found
> > WARNING:  PerformPortalClose: portal "pgsql_006e0460" not found
> > 
> > These do not occur when I access the database using the psql CLI 
> > application.
> 
> They do [1] ;-)
> 
> > Everything appears to work as it should even with these warnings but 
> > they certainly are preventing me from releasing a production system 
> > until I can figure out what is causing this.
> > 
> > I have already posted this to postgresql-general but Bruce Mojiam 
> > seemed to think it was related to the Python interface since he was 
> > unable to make it occur with any of the other Python interfaces.
> 
> I already answered there.
> 
> > Any ideas?
> 
> Yes, con.conn.toggleShowQuery does the trick, again:
> 
> #v+
> gerhard@gargamel:~$ python
> Python 2.2.2 (#1, Nov 30 2002, 23:19:58) 
> [GCC 2.95.4 20020320 [FreeBSD]] on freebsd4
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from pyPgSQL import PgSQL
> >>> con = PgSQL.connect()
> >>> con.conn.toggleShowQuery
> 'On'
> >>> cursor = con.cursor()
> QUERY: BEGIN WORK
> >>> cursor.execute("select * from test")
> QUERY: DECLARE "PgSQL_0811F1EC" CURSOR FOR select * from test
> QUERY: FETCH 1 FROM "PgSQL_0811F1EC"
> QUERY: SELECT typname, -1 , typelem FROM pg_type WHERE oid = 23
> QUERY: SELECT typname, -1 , typelem FROM pg_type WHERE oid = 1043
> >>> result = cursor.fetchmany(5)
> QUERY: FETCH 4 FROM "PgSQL_0811F1EC"
> >>> result
> [[None, 'A'], [None, 'B'], [None, 'C'], [None, 'F'], [None, 'F']]
> >>> con.commit()
> QUERY: CLOSE PgSQL_0811F1EC
> QUERY: COMMIT WORK
> >>> 
> #v-
> 
> This gives me a warning like this:
> 
> #v+
> WARNING:  PerformPortalClose: portal "pgsql_0811f1ec" not found
> #v-
> 
> The SQL pyPgSQL emits looks perfectly valid to me. So I'm inclined to think
> that the PostgreSQL warning is superfluous, at best.
> 
> Gerhard

The close of the cursor isn't quoted, so PostgreSQL converts it to lower case. 
 This causes the problem.  I will generate a patch for this tomorrow.

Later.

-- 
____       | Billy G. Allie    | Domain....: [email protected]
|  /|      | 7436 Hartwell     | MSN.......: [email protected]
|-/-|----- | Dearborn, MI 48126|
|/  |LLIE  | (313) 582-1540    |
signature.asc (application/pgp-signature, 3 KB)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Content-Type: text/plain; charset=us-ascii

Gerhard Haering wrote:
> * Michael Engelhart <[email protected]> [2002-12-22 17:48 -0500]:
> > Hi -
> > i'm running pyPgSQL 2.3 on Mac OS X 10.2.2, PostgreSQL 7.3, and  Python 
> > 2.2
> > 
> > When doing any SELECT, UPDATE, INSERT or DELETE operations on the 
> > database I get the following database warning errors:
> > 
> > WARNING:  PerformPortalClose: portal "pgsql_0061be10" not found
> > WARNING:  Closing pre-existing portal "PgSQL_0061BE10"
> > WARNING:  PerformPortalClose: portal "pgsql_0061be10" not found
> > WARNING:  PerformPortalClose: portal "pgsql_006e0460" not found
> > 
> > These do not occur when I access the database using the psql CLI 
> > application.
> 
> They do [1] ;-)
> 
> > Everything appears to work as it should even with these warnings but 
> > they certainly are preventing me from releasing a production system 
> > until I can figure out what is causing this.
> > 
> > I have already posted this to postgresql-general but Bruce Mojiam 
> > seemed to think it was related to the Python interface since he was 
> > unable to make it occur with any of the other Python interfaces.
> 
> I already answered there.
> 
> > Any ideas?
> 
> Yes, con.conn.toggleShowQuery does the trick, again:
> 
> #v+
> gerhard@gargamel:~$ python
> Python 2.2.2 (#1, Nov 30 2002, 23:19:58) 
> [GCC 2.95.4 20020320 [FreeBSD]] on freebsd4
> Type "help", "copyright", "credits" or "license" for more information.
> >>> from pyPgSQL import PgSQL
> >>> con = PgSQL.connect()
> >>> con.conn.toggleShowQuery
> 'On'
> >>> cursor = con.cursor()
> QUERY: BEGIN WORK
> >>> cursor.execute("select * from test")
> QUERY: DECLARE "PgSQL_0811F1EC" CURSOR FOR select * from test
> QUERY: FETCH 1 FROM "PgSQL_0811F1EC"
> QUERY: SELECT typname, -1 , typelem FROM pg_type WHERE oid = 23
> QUERY: SELECT typname, -1 , typelem FROM pg_type WHERE oid = 1043
> >>> result = cursor.fetchmany(5)
> QUERY: FETCH 4 FROM "PgSQL_0811F1EC"
> >>> result
> [[None, 'A'], [None, 'B'], [None, 'C'], [None, 'F'], [None, 'F']]
> >>> con.commit()
> QUERY: CLOSE PgSQL_0811F1EC
> QUERY: COMMIT WORK
> >>> 
> #v-
> 
> This gives me a warning like this:
> 
> #v+
> WARNING:  PerformPortalClose: portal "pgsql_0811f1ec" not found
> #v-
> 
> The SQL pyPgSQL emits looks perfectly valid to me. So I'm inclined to think
> that the PostgreSQL warning is superfluous, at best.
> 
> Gerhard

The close of the cursor isn't quoted, so PostgreSQL converts it to lower case. 
 This causes the problem.  I will generate a patch for this tomorrow.

Later.

- -- 
____       | Billy G. Allie    | Domain....: [email protected]
|  /|      | 7436 Hartwell     | MSN.......: [email protected]
|-/-|----- | Dearborn, MI 48126|
|/  |LLIE  | (313) 582-1540    |


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.2 (UnixWare)
Comment: Exmh version 2.2 06/23/2000

iD8DBQE+Bp8onmIkMXoVVdURAotkAJ4n9KvPUI8v+K5egpxHLPsp+jBryACggmPe
FNmXIL7qRR9JY9zp17iG4CI=
=SVyz
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.