If they're not, the below causes problems, as the foreign key is added
authorBruce Momjian <bruce@momjian.us>
Wed, 25 Jun 2003 04:08:19 +0000 (04:08 +0000)
committerBruce Momjian <bruce@momjian.us>
Wed, 25 Jun 2003 04:08:19 +0000 (04:08 +0000)
commita09ccc70dd78b33271b06a6c250f7578aa4e16a1
treec525805c35c68c7124d936a713f32d7bde71fe48
parentca64391d6ca5a8aef6876961f2a8517e014b472d
If they're not, the below causes problems, as the foreign key is added
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>
src/bin/pg_dump/pg_dump.c