I added a new column in my PostgreSQL/PostGIS database for getting surface area. I can open as a layer in QGIS, but when I draw a new polygon the area column is not updated, is there a way to have it updated as soon as I finish drawing the polygon?
This is the SQL I used:
ALTER TABLE public."EDIFICIO_2" ADD COLUMN area double precision;
UPDATE "EDIFICIO_2" SET area = round((ST_AREA(geom)) :: numeric,2);