[DB-SIG] May we get an actual ANSWER to the F.A.Q...How can I construct a dictionary???

Chris Cogdon chris at cogdon.org
Mon Sep 22 17:47:18 EDT 2003


Actually... some connectors do the assignment for you, such as pyPgSQL:

row = cursor.fetchone()
print row['somecolumnname']

The downside of this is that pyPgSQL takes a BIG performance hit 
because of all the, possibly unnecessary, dictionary assignments before 
it returns the values. Search the db-sig archives for a performance 
matrix I posted.


-- 
    ("`-/")_.-'"``-._        Chris Cogdon <chris at cogdon.org>
     . . `; -._    )-;-,_`)
    (v_,)'  _  )`-.\  ``-'
   _.- _..-_/ / ((.'
((,.-'   ((,/   fL




More information about the DB-SIG mailing list