From: Mathieu Arnold <mat@mat.cc>
To: davide <site.webmaster@email.it>
To: pgsql-sql@postgresql.org
Subject: Re: multiple PK with a non UNIQUE field
Date: Sun, 26 Jun 2005 17:14:20 +0200
Message-ID: <416F186D0B67C67BDFA439FE@cc-171.int.t-online.fr> (raw)
In-Reply-To: <42BEC2AA.9030404@email.it>
References: <42BEC2AA.9030404@email.it>
+-le 26/06/2005 16:58 +0200, davide écrivait :
| CREATE TABLE appalto (
| cod_op int not null references Opere,
| cod_com int not null references Opere,
| scadenza date not null,
| importo int not null, PRIMARY KEY (cod_op,cod_com)
| );
You have to :
CREATE TABLE appalto (
cod_op int not null,
cod_com int not null,
scadenza date not null,
importo int not null,
PRIMARY KEY (cod_op,cod_com),
foreign key (cod_op,cod_com) references opere (cod_op,cod_com)
);
--
Mathieu Arnold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: mat@mat.cc, site.webmaster@email.it
Subject: Re: multiple PK with a non UNIQUE field
In-Reply-To: <416F186D0B67C67BDFA439FE@cc-171.int.t-online.fr>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox