FAQ
While fiddling with FK tuning, it was useful to be able to enable and
disable the DEFERRED mode of constraints.

That is not currently possible in SQL, so I wrote this patch. Without
this you have to drop and then re-add a constraint, which is
impractical for large tables.

e.g.
CREATE TABLE fktable (id integer, fk integer REFERENCES pktable (id));

ALTER TABLE foo
    ALTER CONSTRAINT fktable_fk_fkey DEFERRED INITIALLY IMMEDIATE;

Includes docs and tests.

Currently works for FKs only. Potentially other constraints can be
supported in future.

--
  Simon Riggs http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 10 | next ›
Discussion Overview
grouppgsql-hackers @
categoriespostgresql
postedJun 8, '13 at 8:45p
activeJun 28, '13 at 4:42p
posts10
users8
websitepostgresql.org...
irc#postgresql

People

Translate

site design / logo © 2021 Grokbase