fstring

st_geomfromtext = "st_geomfromtext('point(%s %s)',4326)"
insert_sql = f"insert into poi_hn_prd ({util.list_join(to_fields, ',')}) 
values({'%s,' * (len(to_fields) - 1) + st_geomfromtext})"
使用limit 进行分块数据提取时候一定指定排序字段
f"select {util.list_join(from_fields, ',')} from poi_hn_edit 
ORDER BY hn_id limit {page_size} offset {start}"

你可能感兴趣的:(fstring)