PostgreSQL CREATE OR REPLACE FUNCTION, VIEW, TRIGGER
Submitted by Jean-Michel POURE
Assigned to mal..@..db.org
Since 7.2, PostgreSQL supports CREATE OR REPLACE FUNCTION to allows function edition. PostgreSQL does not support CREATE OR REPLACE VIEW OR CREATE OR REPLACE TRIGGER which will only be added in 7.3.
Therefore, modifying a view or a trigger is tedious and boring : you need to drop it before recreating it. If the new definition is mistaken, you loose the view/trigger.
Using libgda it should be possible to virtually modify a view or a trigger using DROP/CREATE in a single transaction.