if you need a multi column fk don't use the "references" keyword on your create table, instead use the "FOREIGN KEY"
keyword for the table, see the "create table" help.
so for example (untested) change
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)
);
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)
);
In this way it works, thanks.
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?
http://www.postgresql.org/docs/faq