Re: Why does Postgres allow duplicate (FK) constraints

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Why does Postgres allow duplicate (FK) constraints
Date: 2013-03-26 16:07:48
Message-ID: kish2h$nnh$1@ger.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane, 26.03.2013 17:03:
>> While I agree that this SQL should not have been written like this
>> in the first place, I wonder why Postgres doesn't actively prevent
>> 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.

Is there anything in the standard that actively requires that you can create two "identical" constraints?

Because technically it simply doesn't make sense, does it?

Regards
Thomas

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2013-03-26 16:16:08 Re: Why does Postgres allow duplicate (FK) constraints
Previous Message Tom Lane 2013-03-26 16:03:36 Re: Why does Postgres allow duplicate (FK) constraints