Re: references table(multiple columns go here)

Поиск
Список
Период
Сортировка
От Gary Stainburn
Тема Re: references table(multiple columns go here)
Дата
Msg-id 200212191522.30765.gary.stainburn@ringways.co.uk
обсуждение исходный текст
Ответ на Re: references table(multiple columns go here)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: references table(multiple columns go here)
Следующее
От: val@webtribe.net
Дата:
Сообщение: Perform a Select on an Oracle Database from PG