我有一个简单的数据库,将附件存储为blob。SELECT lo_export(attachdata, 'C:\temp\blob_export_postgres.txt') FROM attachment WHERE id = 1con = connect(dbname="blobtest", user="postgres", password="postgres
我想使用python将zip文件存储在postgres数据库中。 这看起来应该很容易,但我做不出来。 这就是我尝试过的--我的问题是如何将zipfile转换成bytea对象。test.zip" binary_stream = BytesIO(zip_archive)
with db.engine.connect() as connection: