상세 컨텐츠

본문 제목

[Python] psycopg2 에서 실행된 쿼리문 전체 보기

Programming/Backend

by BitSense 2020. 4. 29. 16:30

본문

import psycopg2 as pg2
from psycopg2.extras import DictCursor

conn = pg2.connect()
cursor = conn.cursor(cursor_factory=DictCursor)
cursor.execute('select %s, %s', ('test', 2))
cursor.query
"select E'test', 2"
반응형

관련글 더보기