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-27 08:51:50
Message-ID: kiubt3$9s$1@ger.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane, 26.03.2013 17:16:
> The lack of any prohibition to the contrary means there is no way to
> argue that the code you showed previously violates the spec; thus,
> a database that fails to accept it is rejecting spec-compliant DDL.

I'm not claiming that the spec is violated...
(And I'm not complaining either. I'm just curious if there was a technical reason)

> Well, it's redundant, but that doesn't make it wrong. In any case,
> there are lots of ways that things might be redundant. Should we
> reject a unique constraint on (a,b) if there's already one on (b,a)?
> Or if there are separate unique constraints on each of a and b?

Hmm, good point.

Although I think a definition that is identical with regards of the columns and their position in the constraint _could_ be considered identical.

Anyway thanks for the feedback.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Kellerer 2013-03-27 08:54:03 Re: Why does Postgres allow duplicate (FK) constraints
Previous Message Misa Simic 2013-03-27 08:27:19 Re: Understanding behavior of SELECT with multiple unnested columns