Re: [GENERAL] Foreign Key Unique Constraint can be dropped

2009-06-08 Thread Tom Lane
Vlado Moravec writes: > 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

Re: [GENERAL] Foreign Key Unique Constraint can be dropped

2009-06-08 Thread Grzegorz Jaƛkiewicz
On Mon, Jun 8, 2009 at 11:48 AM, Vlado Moravec wrote: > 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 n

[GENERAL] Foreign Key Unique Constraint can be dropped

2009-06-08 Thread Vlado Moravec
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 dr