- postcode, geometry) VALUES %s""",
- to_add,
- template=pysql.SQL("""(nextval('seq_place'), 1, {},
- %s, 'SRID=4326;POINT(%s %s)')
- """).format(pysql.Literal(self.country)))
+ postcode, geometry)
+ VALUES (nextval('seq_place'), 1, {}, %s,
+ ST_SetSRID(ST_MakePoint(%s, %s), 4326))
+ """).format(pysql.Literal(self.country)),
+ to_add)