mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
The ALTER TABLE to set the foreign key as DEFERRABLE only worked on
9.4+, as there is no ALTER CONSTRAINT in 9.3. This new ALTER TABLE does the same in two hops by removing the foreign key and creating it again in the same ALTER TABLE. This fixes #183
This commit is contained in:
@@ -27,5 +27,6 @@
|
||||
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE repl_nodes ALTER CONSTRAINT repl_nodes_upstream_node_id_fkey DEFERRABLE;
|
||||
ALTER TABLE repl_nodes DROP CONSTRAINT repl_nodes_upstream_node_id_fkey,
|
||||
ADD CONSTRAINT repl_nodes_upstream_node_id_fkey FOREIGN KEY (upstream_node_id) REFERENCES repl_nodes(id) DEFERRABLE;
|
||||
COMMIT;
|
||||
|
||||
Reference in New Issue
Block a user