Вот мой код:
output_file_name_read = open(output_file_name,'rb').read() # там мы писали, тут читаем
# SQL_update_request = """UPDATE "REQUESTS" SET shape = {0} WHERE request_id = 6""".format(psycopg2.Binary(output_file_name_read))
currDst.execute("""UPDATE "REQUESTS" SET shape = %s WHERE request_id = 7""", psycopg2.Binary(output_file_name_read))
postconn.commit()
При запуске получаю ошибку:
Traceback (most recent call last):
File "C:\work\App.py", line 67, in <module>
main()
File "C:\work\App.py", line 64, in main
SyncRequest(postconn, fireconn, 'POSTID', 'FIREID')
File "C:\work\App.py", line 49, in SyncRequest
currDst.execute("""UPDATE "REQUESTS" SET shape = %s WHERE request_id = 7""", psycopg2.Binary(output_file_name_read))
File "C:\Python27\ArcGIS10.1\lib\site-packages\fdb\fbcore.py", line 3322, in execute
PreparedStatement(operation, self, True))
File "C:\Python27\ArcGIS10.1\lib\site-packages\fdb\fbcore.py", line 1934, in __init__
"Error while preparing SQL statement:")
fdb.fbcore.DatabaseError: ('Error while preparing SQL statement:\n- SQLCODE: -104\n- Dynamic SQL Error\n- SQL error code = -104\n- Token unknown - line 1, column 31\n- %', -104, 335544569)
Что я делаю не так?