Re: foreign key constraint - Mailing list pgsql-general

From Tom Lane
Subject Re: foreign key constraint
Date
Msg-id 23428.1046794498@sss.pgh.pa.us
Whole thread Raw
In response to foreign key constraint  (Dennis Gearon <gearond@cvc.net>)
List pgsql-general
Dennis Gearon <gearond@cvc.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

pgsql-general by date:

Previous
From: Dennis Gearon
Date:
Subject: foreign key constraint
Next
From: Stephan Szabo
Date:
Subject: Re: foreign key constraint