• Bruce Momjian's avatar
    If they're not, the below causes problems, as the foreign key is added · a09ccc70
    Bruce Momjian authored
    after the CHECK.  Cluster depends on the index name, so I thought it
    wise to ensure all names are available, rather than leaving off the
    CONSTRAINT "$n" portion for internally named constraints.
    
    CREATE TABLE jkey (col integer primary key);
    CREATE TABLE j (col integer REFERENCES jkey);
    ALTER TABLE j ADD CHECK(col > 5);
    
    This is a problem in 7.3 series as well as -Tip.
    
    Rod Taylor <rbt@rbt.ca>
    a09ccc70
pg_dump.c 184 KB