Re: references table(multiple columns go here) - Mailing list pgsql-sql

From Gary Stainburn
Subject Re: references table(multiple columns go here)
Date
Msg-id 200212191522.30765.gary.stainburn@ringways.co.uk
Whole thread Raw
In response to Re: references table(multiple columns go here)  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-sql
On Thursday 19 Dec 2002 3:17 pm, Tom Lane wrote:
> Gary Stainburn <gary.stainburn@ringways.co.uk> writes:
> > That did the trick.  However, I now have another problem with the
> > constraint complaining about there not being an index to refer to. 
> > However, there is.
>
> No there isn't:
> > jrank        int4 not null references ranks(rrank),    -- needs sorting
>
>                               ^^^^^^^^^^^^^^^^^^^^^^^
>
> You have no index constraining rrank (by itself) to be unique.

Thanks for that Tom. The reason that I didn't have that index is because rrank 
is not unique thus the need for the 2 field constraint that started this 
thread.  I'd just forgot to remove the references clause.

Thanks to you too for your help. Between you and Tomasz, I'm making pretty 
good progress on what is (not very) slowly turning from a small project to 
the largest database project I've done to date.

>
>             regards, tom lane

-- 
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000     



pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: references table(multiple columns go here)
Next
From: val@webtribe.net
Date:
Subject: Perform a Select on an Oracle Database from PG