Ensure all implicit constraints are named

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Ensure all implicit constraints are named
Date: 2003-06-05 00:48:03
Message-ID: 1054774083.26169.6.camel@jester
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

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(at)rbt(dot)ca>

PGP Key: http://www.rbt.ca/rbtpub.asc

Attachment Content-Type Size
pg_dump-conname.patch text/x-patch 836 bytes

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2003-06-05 04:37:59 Re: Adding Rendezvous support to postmaster
Previous Message Rod Taylor 2003-06-04 23:53:51 Re: pgstattuple for schemas