Foreign Key Unique Constraint can be dropped

From: Vlado Moravec <vm(dot)devs(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Foreign Key Unique Constraint can be dropped
Date: 2009-06-08 10:48:04
Message-ID: dafe6b860906080348h76e26329vfcb21cb6a87798c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
from postgres docs: "foreign key must reference columns that either are a
primary key or form a unique constraint". It does not allow creating foreign
key constraint on non-unique column - an error is raised.
After playing with a new database I discovered that such a unique constraint
can be droped after the foreign key constraint has been established. No
warning, no error.
Is such a behaviour intended? I have found no references in the docs.
Thanks.
Vladimir

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jasen Betts 2009-06-08 11:16:57 Re: Schema, database, or tables in different folders?
Previous Message Albe Laurenz 2009-06-08 10:37:59 Re: Function: Change data while walking through records