problem with uniques and foreing keys - Mailing list pgsql-sql

From kernel.alert kernel.alert
Subject problem with uniques and foreing keys
Date
Msg-id e24c449c0605061027t5d8c06aeoe271580c5244922f@mail.gmail.com
Whole thread Raw
Responses Re: problem with uniques and foreing keys
Re: problem with uniques and foreing keys
Re: problem with uniques and foreing keys
Re: problem with uniques and foreing keys
List pgsql-sql
Hi list...<br /><br />Please i have a problem with this...<br /><br />I create the follow tables...<br /><br
/>--------------------------------------------------------<br/><br />CREATE TABLE empresa (<br />  id_empresa        
integer NOT NULL primary key, <br />  nombre             varchar(45),<br />);<br />CREATE TABLE casino (<br /> 
id_casino         integer  NOT NULL,<br />  id_empresa         integer      REFERENCES empresa(id_empresa),<br /><br
/> nombre             varchar(45), <br /><br />  primary key(id_casino,id_empresa)<br />);<br />CREATE TABLE maq_casino
(<br/>  id_empresa      integer  NOT NULL REFERENCES  casino(id_empresa),<br />  id_casino       integer  NOT NULL
REFERENCES casino(id_casino),<br /><br />  ubicacion_sala     varchar(45) default NULL,<br />  primary
key(id_empresa,id_casino,id_tipo_maquina,id_maq_casino)<br/>);<br /><br
/>--------------------------------------------------------<br/><br />When i'm gonna to create the last table i got this
error:<br /><br />ERROR:  no hay restriccion unique que coincida con las columnas dadas en la tabla referida
<<casino>><br/><br />That in english is like .. there is no a unique constraint with columns referred  in
casinotable. <br /><br /><br />Please where is the problem...<br /><br />Greetings ...<br /><br />Krackem<br /><br
/><br/> 

pgsql-sql by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: Returning String as Integer
Next
From: Terry Lee Tucker
Date:
Subject: Re: problem with uniques and foreing keys