From: Mike C. F. <mcf...@ro...> - 2004-02-25 10:54:12
|
Found it. At some point I must have accidentally hit a delete key and out-dented a line in PgSQL.py while trying to track down a different error: if len(parms) == 1 and \ (type(parms[0]) in [DictType, ListType, TupleType] or \ isinstance(parms[0], PgResultSet)): parms = _quoteall(self.__unicodeConvert(parms[0])) self.res = self.conn.conn.query(_qstr % parms) else: parms = self.__unicodeConvert(parms) parms = tuple(map(_quote, self.__unicodeConvert(parms))); self.res = self.conn.conn.query(_qstr % parms) so the query wound up being executed twice if a request met a particular requirement, and once otherwise. The reason I couldn't reproduce the error in a script is that I was passing in the fully-expanded SQL queries in order to be sure I was executing exactly what was getting to the engine. Those would always take the "else" branch and thus only create the cursor once (and, incidentally, this explains the previously-seen problem of mysterious duplicate inserts which triggered the whole update to PostgreSQL 7.4 in the first place). Sigh. Two days gone for a stupid reformatting/random keypress error. I should beat myself about the head for that one. Sorry for bothering everyone with this. Night all, Mike _______________________________________ Mike C. Fletcher Designer, VR Plumber, Coder http://members.rogers.com/mcfletch/ |