PostgreSQL view

From gnewarchaeology wiki
Jump to: navigation, search
PostgreSQL > PostgreSQL view

Create views with the geom column

  • []

create view view_lithic_tool as select record, lithic_class, lithic_object, typo, blank, tool, retouch, comment from lithic where lithic_object = 'tool';

Update views

  • []

create rule lithic_upd as on update to view_lithic_tool do instead update lithic set lithic_class = NEW.lithic_class where record = NEW.record;