Re: references table(multiple columns go here)

From: Gary Stainburn <gary(dot)stainburn(at)ringways(dot)co(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: references table(multiple columns go here)
Date: 2002-12-19 15:22:30
Message-ID: 200212191522.30765.gary.stainburn@ringways.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thursday 19 Dec 2002 3:17 pm, Tom Lane wrote:
> Gary Stainburn <gary(dot)stainburn(at)ringways(dot)co(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message val 2002-12-19 15:37:00 Perform a Select on an Oracle Database from PG
Previous Message Tom Lane 2002-12-19 15:17:13 Re: references table(multiple columns go here)