sql_db: use "mogrify" to format the query for debug
sql_db: use "mogrify" to format the query for debug

psycopg2.cursor.mogrify() is the function that converts the parsed
arguments into the proper SQL string. This way, the output from the
logs can be directly copy-pasted into a PG prompt.

xrg/openerp-server,xrg/openerp-server