Re: Primary key and references
От | Shridhar Daithankar |
---|---|
Тема | Re: Primary key and references |
Дата | |
Msg-id | 200303182030.16124.shridhar_daithankar@persistent.co.in обсуждение исходный текст |
Ответ на | Re: Primary key and references ("Nigel J. Andrews" <nandrews@investsystems.co.uk>) |
Список | pgsql-hackers |
On Tuesday 18 Mar 2003 8:07 pm, Nigel J. Andrews wrote: > On Tue, 18 Mar 2003, Shridhar Daithankar<shridhar_daithankar@persistent.co.in> wrote: > > I consider this as a bug but given my understanding of sql, I won't count > > on it. Any comments? > > If a is to be referenced in a foreign key it needs to be unique or how > could it it be known which of the rows with a given value are being refered > to. It follows that if a can be referenced in a foreign key then a uniquely > identifies a row in the referenced table and therefore a primary key of > (a,b) necessarily is unique based solely on a, i.e. the (a,b) combination > seems unlikely to be the primary key for the table. Hmm.. So I need to create unique constraint on original column. OK. Got it now.. Shridhar
В списке pgsql-hackers по дате отправления: