+ SELECT INTO res COUNT(*) FROM paths WHERE ST_AsBinary(geom) = ST_AsBinary(NEW.geom) AND creator = NEW.creator AND id != NEW.id;
+ -- unique (geom, creator) constraint will not work: first because of postgis
+ -- #541; then because equality is checked by comparing bbox instead of real
+ -- geometries. So, we implement that constraint in a trigger