Changeset 3330
- Timestamp:
- 08/23/07 17:48:03 (1 year ago)
- Files:
-
- trunk/dabo/db/dbPostgreSQL.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/dabo/db/dbPostgreSQL.py
r3329 r3330 68 68 tables = [] 69 69 for record in rs: 70 tables.append(record[ 0])70 tables.append(record["tablename"]) 71 71 return tuple(tables) 72 72 … … 74 74 def getTableRecordCount(self, tableName, cursor): 75 75 cursor.execute("select count(*) as ncount from %s" % tableName) 76 return cursor.getDataSet()[0][ 0]76 return cursor.getDataSet()[0]["ncount"] 77 77 78 78 … … 107 107 else: 108 108 #thestr = rs2[0][3] 109 #thePKFieldName = thestr[thestr.find("(") + 1: thestr.find(")")].split(", ")110 #thePKFieldName = rs2[0][3]111 109 thePKFieldName = rs2[0]['column_name'] 112 110 113 111 fields = [] 114 112 for r in rs: 115 name = r['attname'] 116 #fldType =r[2] 117 fldType =r['typname'] 113 name = r["attname"] 114 fldType =r["typname"] 118 115 pk = False 119 116 if thePKFieldName is not None:
