Last active
March 30, 2021 17:39
-
-
Save iacovlev-pavel/5dfd4007b701586de8ea7a782d59c633 to your computer and use it in GitHub Desktop.
tst_postrau_change.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION giscuit_layers.tst_postrau_change() RETURNS TRIGGER AS $$ | |
BEGIN | |
NEW.the_geom := (SELECT the_geom FROM giscuit_layers.tst_postrau WHERE tst_postrau.gid = NEW.postraugid); | |
RETURN NEW; | |
END; | |
$$ LANGUAGE plpgsql; | |
DROP TRIGGER IF EXISTS tst_postrau_change ON giscuit_layers.tst_dtpstrau_map; | |
CREATE TRIGGER tst_postrau_change BEFORE UPDATE ON giscuit_layers.tst_dtpstrau_map FOR EACH ROW EXECUTE PROCEDURE giscuit_layers.tst_postrau_change(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment