[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-sql
Subject:    Re: [SQL] references table(multiple columns go here)
From:       Gary Stainburn <gary.stainburn () ringways ! co ! uk>
Date:       2002-12-19 15:22:30
[Download RAW message or body]

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     


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic