Re: FK pointing to a VIEW

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: FK pointing to a VIEW
Дата
Msg-id b42b73150611101131q642e8429s30aa12c054072733@mail.gmail.com
обсуждение исходный текст
Ответ на FK pointing to a VIEW  (Sandro Dentella <sandro@e-den.it>)
Список pgsql-general
On 11/10/06, Sandro Dentella <sandro@e-den.it> wrote:
> Do I understad correctly that i cannot point a Foreign Key to a view? Which
> is the rationale of this?

Blame the sql standard.  Foreign keys are required to reference a
table with a unique constraint, and you can't add a unique constraint
to a view.  While I agree in principle that such a thing should be
able to be done, it simply isn't possible.  (in PostgreSQL, you can't
even add an index to a view, which a unique constraint would depend
on).

merlin

В списке pgsql-general по дате отправления:

Предыдущее
От: Sandro Dentella
Дата:
Сообщение: FK pointing to a VIEW
Следующее
От: "Brendan Jurd"
Дата:
Сообщение: Request for replication advice