Re: foreign key constraint

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: gearond(at)cvc(dot)net
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: foreign key constraint
Date: 2003-03-04 16:14:58
Message-ID: 23428.1046794498@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dennis Gearon <gearond(at)cvc(dot)net> writes:
> ALTER TABLE testUsrEmails ADD CONSTRAINT FOREIGN KEY (usr_id) REFERENCES testUsrs (usr_id)

Read the syntax more closely. You can say ... ADD FOREIGN KEY ...
or ... ADD CONSTRAINT constraint_name FOREIGN KEY ...

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rod Taylor 2003-03-04 16:16:20 Re: [PATCHES] ALTER SEQUENCE
Previous Message Dennis Gearon 2003-03-04 16:01:50 foreign key constraint