I try to insert data in exist table:
img_query = "INSERT INTO images (img_name) VALUES ({}) RETURNING id".format(img)
img_id = self.engine.execute(img_query)
I use sqlalchemy engine for execution. As a result received this type of mistakes:
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.SyntaxError) syntax error at or near "_Group_Large_Group_12_Group_Large_Group_12_15"
LINE 1: INSERT INTO images (img_name) VALUES (12_Group_Large_Group_1...
I tried to change "12_" on "12" or replace all "_" on "-". Result not changed I received same error.