From: Gary Stainburn <gary.stainburn@ringways.co.uk>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: Re: references table(multiple columns go here)
Date: Thu, 19 Dec 2002 15:22:30 +0000
Message-ID: <200212191522.30765.gary.stainburn@ringways.co.uk> (raw)
In-Reply-To: <18473.1040311033@sss.pgh.pa.us>
References: <200212181625.11316.gary.stainburn@ringways.co.uk>
<200212190928.19736.gary.stainburn@ringways.co.uk>
<18473.1040311033@sss.pgh.pa.us>
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
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 using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: gary.stainburn@ringways.co.uk, tgl@sss.pgh.pa.us
Subject: Re: references table(multiple columns go here)
In-Reply-To: <200212191522.30765.gary.stainburn@ringways.co.uk>
* 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