Re: Why does Postgres allow duplicate (FK) constraints - Mailing list pgsql-general

From Tom Lane
Subject Re: Why does Postgres allow duplicate (FK) constraints
Date
Msg-id 13271.1364313816@sss.pgh.pa.us
Whole thread Raw
In response to Why does Postgres allow duplicate (FK) constraints  (Thomas Kellerer <spam_eater@gmx.net>)
Responses Re: Why does Postgres allow duplicate (FK) constraints
List pgsql-general
Thomas Kellerer <spam_eater@gmx.net> writes:
> While I agree that this SQL should not have been written like this in the first place, I wonder why Postgres doesn't
activelyprevent this (like e.g. Oracle). 

If Oracle does that, they're violating the SQL standard --- there is
nothing in the standard that supports rejecting an ALTER TABLE ADD
CONSTRAINT on the grounds that it's redundant.  The spec only says
you can't give two constraints the same name.

            regards, tom lane


pgsql-general by date:

Previous
From: Thomas Kellerer
Date:
Subject: Why does Postgres allow duplicate (FK) constraints
Next
From: Thomas Kellerer
Date:
Subject: Re: Why does Postgres allow duplicate (FK) constraints