前提是已经创建连接了
from psycopg2.extensions import AsIs
cur = conn.cursor()
schame='schemaname'
table = 'tablename'
cur.execute("create table %s.%s(name text)",(AsIs(schema),AsIs(table)));
conn.commit()
前提是已经创建连接了
from psycopg2.extensions import AsIs
cur = conn.cursor()
schame='schemaname'
table = 'tablename'
cur.execute("create table %s.%s(name text)",(AsIs(schema),AsIs(table)));
conn.commit()