Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0TMXRq41789; Mon, 29 Jan 2001 17:33:27 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.1/8.11.1) with ESMTP id f0TMWr925977; Mon, 29 Jan 2001 17:32:53 -0500 (EST) To: Kovacs Zoltan cc: pgsql-hackers@postgresql.org, pgsql-sql@postgresql.org Subject: Re: 7.1beta4 bug creating a certain table In-reply-to: References: Comments: In-reply-to Kovacs Zoltan message dated "Mon, 29 Jan 2001 22:07:15 +0100" Date: Mon, 29 Jan 2001 17:32:52 -0500 Message-ID: <25974.980807572@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200101/1325 X-Sequence-Number: 4090 Kovacs Zoltan writes: > CREATE TABLE pakolas_cikktetel ( > pakolas int4 not null, > cikk int4 not null, > minoseg int4 not null, > sorszam int4 check (sorszam > 0), > helyrol int4, > helyre int4, > mennyi numeric(14,4) not null , > lezarva bool default 'f', > primary key (pakolas, cikk, minoseg, sorszam), > unique (pakolas, cikk, minoseg, helyrol, helyre)); > CREATE TABLE keszlet_bevetel ( > keszletnovekedes int4 not null primary key, > pakolas int4 not null, > cikk int4 not null, > minoseg int4 NOT NULL, > foreign key (pakolas, cikk, minoseg) > references pakolas_cikktetel(pakolas, cikk, minoseg)); > ERROR: UNIQUE constraint matching given keys for referenced table > "pakolas_cikktetel" not found It appears to me that this is correct, since there is no constraint on the first column that says that those three columns form a unique key *by themselves*. I believe there were bugs in the code that checked for this error before ... regards, tom lane