【发布时间】:2015-07-12 12:52:46
【问题描述】:
代码
import psycopg2
import psycopg2.extras
def store_values_to_pg94(file_size, connection):
cursor = connection.cursor()
cursor.execute(
INSERT INTO measurements
(file_size)
VALUES (file_size)
其中 PostgreSQL 9.4 中列的字段名称是 file_size 但在 Python 中变量名称也是 file_size。
如何避免这种冲突?
【问题讨论】:
标签: python postgresql-9.4