pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu>
Cc: pgsql-hackers@postgresql.org
Cc: pgsql-sql@postgresql.org
Subject: Re: 7.1beta4 bug creating a certain table
Date: Mon, 29 Jan 2001 17:32:52 -0500
Message-ID: <25974.980807572@sss.pgh.pa.us> (raw)
In-Reply-To: <Pine.LNX.4.21.0101292205450.1541-100000@pc10.radnoti-szeged.sulinet.hu>
References: <Pine.LNX.4.21.0101292205450.1541-100000@pc10.radnoti-szeged.sulinet.hu>

Kovacs Zoltan <kovacsz@pc10.radnoti-szeged.sulinet.hu> 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



view thread (5+ messages)  latest in thread

Message-ID: <25974.980807572@sss.pgh.pa.us>
Permalink:  ../25974.980807572@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/25974.980807572@sss.pgh.pa.us

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, kovacsz@pc10.radnoti-szeged.sulinet.hu, pgsql-hackers@postgresql.org
  Subject: Re: 7.1beta4 bug creating a certain table
  In-Reply-To: <25974.980807572@sss.pgh.pa.us>
  References: <Pine.LNX.4.21.0101292205450.1541-100000@pc10.radnoti-szeged.sulinet.hu> <25974.980807572@sss.pgh.pa.us>

* 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