Thank you for Denis who solves the first bug!
How can you have two Postgres queries in one Python method?
Example where the 2nd query is not run
def comp_func(pgmasi):
pgmasi.query("""CREATE TABLE courses (
course_id SERIAL PRIMARY KEY)""")
开发者_开发知识库 pgmasi.query("""CREATE TABLE files ( # not executed for some unknown reason
file_id SERIAL PRIMARY KEY""")
Probably you missed closing parentheses in the line as error message says:
pgmasi.query("INSERT INTO files('binf','file_name') VALUES(file,file_name)"
精彩评论