SHARE
TWEET

Untitled

a guest Jun 16th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE OR REPLACE FUNCTION update_formulario_ep()
  2. RETURNS trigger AS $teste_trigger$
  3. BEGIN
  4. UPDATE formulario.formulario_ep
  5. SET geom = (SELECT ST_GeomFromText( ST_AsText( CAST(ST_GeomFromGeoJSON(geom_js) AS TEXT) ), 4326 ));
  6. RETURN NEW;
  7. END;
  8. $teste_trigger$ LANGUAGE plpgsql;
  9.      
  10. CREATE TRIGGER update_allrows_trigger_ep
  11. AFTER INSERT ON formulario.formulario_ep
  12. FOR EACH ROW
  13. EXECUTE PROCEDURE update_formulario_ep();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top