CREATE TABLE "menu_tbl" (\n "menu_id" varchar(20) NOT NULL,\n "menu_text" varchar(25) NOT NULL,\n "menu_url" varchar(50) NOT NULL,\n "menu_parent" varchar(20) REFERENCES menu_tbl(menu_id) ON UPDATE CASCADE DEFERRABLE INITIALLY DEFERRED,\n CONSTRAINT "menu_tbl_pkey" PRIMARY KEY ("menu_id")\n);\n
Problem is, when I try to update "menu_id" when there is a matching "menu_parent" I get
ERROR: referential integrity violation - key referenced from menu_tbl not found in menu_tbl
So I can get the foreign key working, but I can't get it to cascade the updates.