From: | "David Rowley" <dgrowley(at)gmail(dot)com> |
---|---|
To: | <pgadmin-support(at)postgresql(dot)org> |
Subject: | Bug in foreign key constraint SQL |
Date: | 2013-06-16 00:08:24 |
Message-ID: | 004b01ce6a25$a194a290$e4bde7b0$@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support |
On Testing Version 1.18.0 Alpha 1 I noticed that in the SQL pane for a
self-referencing foreign key constraint the match type is listed as
"unknown".
I'm running pgAdmin on windows 7 64bit on postgresql 9.3 beta1 on the same
OS
Here's the text from the SQL pane.
-- Foreign Key: core.menu_nodes_parentid_fkey
-- ALTER TABLE core.menu_nodes DROP CONSTRAINT menu_nodes_parentid_fkey;
ALTER TABLE core.menu_nodes
ADD CONSTRAINT menu_nodes_parentid_fkey FOREIGN KEY (classid, parentid)
REFERENCES core.menu_nodes (classid, nodeid) MATCH Unknown
ON UPDATE CASCADE ON DELETE CASCADE;
Of couse, this is not valid SQL.
And here's the text from pg_dump of the same constraint.
--
-- TOC entry 2773 (class 2606 OID 33756)
-- Name: menu_nodes_parentid_fkey; Type: FK CONSTRAINT; Schema: core; Owner:
postgres
--
ALTER TABLE ONLY menu_nodes
ADD CONSTRAINT menu_nodes_parentid_fkey FOREIGN KEY (classid, parentid)
REFERENCES menu_nodes(classid, nodeid) ON UPDATE CASCADE ON DELETE CASCADE;
I didn't test previous versions of PgAdmin
Regards
David Rowley.
From | Date | Subject | |
---|---|---|---|
Next Message | Chirag Mittal | 2013-06-16 11:59:19 | Re: (Bug) Numeric fault calculation |
Previous Message | Raymond O'Donnell | 2013-06-15 15:59:14 | Re: Password/Username |