-----Original Message-----
From: Rich Shepard [mailto:rshep...@appl-ecosys.com] 
Sent: Thursday, July 07, 2011 4:05 PM
To: David Johnston
Subject: RE: [GENERAL] Add Foreign Keys To Table

On Thu, 7 Jul 2011, David Johnston wrote:

> To do what you want to do look up "CREATE INDEX" in the documentation.

David,

   Now I understand this.

> You probably need to add "BOTH" fields to "station_information" and 
> then say something like.
>
> FOREIGN KEY (field1, field2) REFERENCES table (field1, field2) ...

   And this would be for each of the two added fields? Same syntax? I've not
used this approach before.

Thanks,

Rich

>>>>>>>>>>>>>>>>>>>>>>>>>

You would HAVE to do it at the TABLE level since a column-level constraint
can only reference that single column.

David J.




-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to