AI智能回复搜索中,请稍后...
[/quote][/quote][/quote][/quote]>> dict_cur = conn.cursor(cursor_factory=psycopg2.extras.DictCursor) [quote]>> dict_cur.execute("INSERT INTO test (num, data) VALUES(%s, %s)", ... (100, "abc'def")) [quote]>> dict_cur.execute("SELECT * FROM test") [quote]>> rec = dict_cur.fetchone() [quote]>> rec 1 >>> rec 100 >>> rec "abc'def"