From: | pgsql-bugs(at)postgresql(dot)org |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Bug #557: triggers tablename are not rename if table are renamed. |
Date: | 2002-01-08 14:45:54 |
Message-ID: | 200201081445.g08Ejsw72125@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Sren laursen (soeren(dot)laursen(at)scrooge(dot)dk) reports a bug with a severity of 2
The lower the number the more severe it is.
Short Description
triggers tablename are not rename if table are renamed.
Long Description
I had a database where I during development created a new table to test a new design. On this table postgresql automatic created triggers because it used foreign keys.
After the test went ok, I rename the table to it "production name". During al test went ok - apparently.
But today during a update run (Importing data via XML) I got complains about missing Relations where to old table name was issued.
I did a dump at (pg_dump) and looked at it and in the end I found that the triggers for example:
CREATE CONSTRAINT TRIGGER "<unnamed>" AFTER INSERT OR UPDATE ON "alternativhold" NOT DEFERRABLE INITIALLY IMMEDIATE FOR EACH ROW EXECUTE PROCEDURE "RI_FKey_check_ins" ('<unnamed>', 'nyalternativhold', 'hold', 'UNSPECIFIED', 'holdnr', 'holdnr');
contains a reference to the old table name nyalternativhold.
I deleted the 3 triggers and the systems runs again.
Best regards
Sren,
Sample Code
No file was uploaded with this report
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-01-08 17:20:45 | Re: Bug #557: triggers tablename are not rename if table are renamed. |
Previous Message | pgsql-bugs | 2002-01-08 10:42:44 | Bug #556: Problem with ODBC Driver Version 7.1.9, DB Version 7.1.3 |