[ Backpatch to 7.3.X.]
authorBruce Momjian <bruce@momjian.us>
Wed, 25 Jun 2003 04:09:15 +0000 (04:09 +0000)
committerBruce Momjian <bruce@momjian.us>
Wed, 25 Jun 2003 04:09:15 +0000 (04:09 +0000)
commit612cbaf5ed7e4a50b45eb7efd4bae7302918eb24
tree0b76e30723fd8bfab78020b0973355d283b2ced7
parent5fbc1d4a452bf06bc4b8701e5a3f0bc7dfcac004
[ Backpatch to 7.3.X.]

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