combine_triggers.sql 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. ----------------------------------------------------------------------------
  2. -- combine_triggers.sql
  3. --
  4. --
  5. -- During Spatial DataBlade module registration, triggers are created
  6. -- on the spatial_references table. If any triggers already exist,
  7. -- registration will fail. To add your own triggers to the
  8. -- spatial_references table, you need to do the following:
  9. --
  10. -- 1. Drop your own triggers on the spatial_references table.
  11. -- 2. Edit this script, adding your own trigger actions in the
  12. -- appropriate places.
  13. -- 3. Register the Spatial DataBlade module using blademgr.
  14. -- 4. Run this script using DB-Access.
  15. --
  16. --
  17. -- Warning on downgrades:
  18. --
  19. -- If you downgrade the Spatial DataBlade module from version 8.11
  20. -- to version 8.10, the triggers on the spatial_references table
  21. -- will be dropped. If you have your own triggers, you must
  22. -- recreate them after completing the downgrade.
  23. -------------------------------------------------------------------------
  24. drop trigger SE_SpRefInsTrig;
  25. drop trigger SE_SpRefUpdTrig;
  26. drop trigger SE_SpRefDelTrig;
  27. create trigger SE_SpRefInsTrig
  28. insert on spatial_references
  29. before
  30. (
  31. execute procedure SE_SpRefBeforeTrig()
  32. -- add additional "before" actions here
  33. )
  34. -- add your own "for each" actions here
  35. after
  36. (
  37. -- add additional "after" actions here
  38. execute procedure SE_SpRefAfterTrig()
  39. );
  40. create trigger SE_SpRefUpdTrig
  41. update on spatial_references
  42. before
  43. (
  44. execute procedure SE_SpRefBeforeTrig()
  45. -- add additional "before" actions here
  46. )
  47. -- add your own "for each" actions here
  48. after
  49. (
  50. -- add additional "after" actions here
  51. execute procedure SE_SpRefAfterTrig()
  52. );
  53. create trigger SE_SpRefDelTrig
  54. delete on spatial_references
  55. before
  56. (
  57. execute procedure SE_SpRefBeforeTrig()
  58. -- add additional "before" actions here
  59. )
  60. -- add your own "for each" actions here
  61. after
  62. (
  63. -- add additional "after" actions here
  64. execute procedure SE_SpRefAfterTrig()
  65. );