#203 Incorrect query for modifying constraints

3.3.3
closed-fixed
Jakub Vrána
PostgreSQL (26)
5
2012-06-29
2011-10-14
Anonymous
No

When I want to add "ON DELETE CASCADE" to the constraint the adminer generates following sql code which is not working (syntax error):

ALTER TABLE "abc"
DROP FOREIGN KEY "def",
ADD FOREIGN KEY ("ghi") REFERENCES "jkl" ("mno") ON DELETE CASCADE;

The working alternative is:

ALTER TABLE "abc"
DROP CONSTRAINT "def",
ADD CONSTRAINT "def" FOREIGN KEY ("ghi") REFERENCES "jkl" ("mno") ON DELETE CASCADE;

Discussion

  • Jakub Vrána
    Jakub Vrána
    2012-06-29

    • status: open --> closed-fixed
     
  • Jakub Vrána
    Jakub Vrána
    2012-06-29

    This is fixed in Adminer 3.3.4.