Postgre instead


```type--delete rulecreate or replace rule "delete_label" as on delete to schools_district_map do insteaddelete from temp_schools_label where oid = old.oid;--insert rulecreate or replace rule "insert_label" as on insert to schools_district_map do insteadinsert into district_map_labels (label_x, label_y)values (new.label_x, new.label_y);--update rulecreate or replace rule "labels_update" as on UPDATE TO schools_district_map do instead update district_map_labels set *label_x = new.label_x,label_y = new.label_y*where oid = new.oid;```

### postgis
```type--delete rulecreate or replace rule "delete_test_line" as on delete to test_line do insteaddelete from test where id = old.id;--insert rulecreate or replace rule "insert_test_line" as on insert to test_line do insteadinsert into test (id, jsb, geom)values (new.id, new.jsb, new.geom)RETURNING id, jsb, geom;--update rulecreate or replace rule "update_test_line" as on UPDATE TO test_line do instead update test set jsb = new.jsb,geom = new.geom::geometrywhere id = new.id;```



```typedrop rule rulename on tablename```


> [Error editing 'editable' view in QGIS](https://gis.stackexchange.com/questions/201181/error-editing-editable-view-in-qgis)

> [DROP RULE](https://www.postgresql.org/docs/9.2/sql-droprule.html)






