PDA

View Full Version : Functions and Triggers in postgresql


zdeh98
04-04-02, 21:33
Good day!!!

Help! We are currently improving our database tables -- we are placing foreign and unique keys. Some tables currently have functions and triggers in them. Generally, what we did was we drop all the tables and re-created them. When we tried using the functions again, it would come up with this error..."Relation <table name> with OID <OID no.> no longer exists".
What happend? Could anyone show us a solution to this problem?

Thanx very much for your help!!!:cool:

eperich
04-14-02, 16:32
Your Problem is that you drop the functions,triggers.
After you have dropped it you create new ones that are the same

they are the same but with different OID's cause internally these are NEW functions

You don't have the problem if you use

CREATE OR REPLACE

When the function exists the oid will not change with this call