I want to "create or replace" a trigger for a postgres table. However, there is not such sql expression.
I see that I can do a "DROP TRIGGER IF EXISTS
" first (http://www.postgresql.org/docs/9.5/static/sql-droptrigger.html).
My question are:
DROP
+ CREATE
trigger)Note that there is a "Create or Replace Trigger
" in oracle (https://docs.oracle.com/cd/B19306_01/appdev.102/b14251/adfns_triggers.htm). Then,
No way to create or replace a trigger but can do this way
DROP TRIGGER IF EXISTS yourtrigger_name on "yourschemaname"."yourtablename";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With