for obj in d.values():
for key, value in obj.items():
print(key, ":", value)
create table images(id int, image bytea);
insert into images values (1, pg_read_file('/path/to/image.jpg')::bytea);
create table images (id int, image oid);
insert into images values (1, lo_import('/path/to/image.jpg'));