Re: Referencing a view?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Referencing a view?
Дата
Msg-id Pine.BSF.4.21.0107121531020.6545-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Referencing a view?  ("James Orr" <james@lrgmail.com>)
Список pgsql-sql
On Thu, 12 Jul 2001, James Orr wrote:

> Hi,
> 
> Is there anyway that you can reference a column in a view for
> referential integrity?  The problem is with the unique thing,
> obviously I can't create a unique index on a view.  Here is what I
> have:

Not right now, and actually you still wouldn't get something that would
work even with a unique index.  We'd have to be able to push the
constraint conditions down into the two tables that you're unioning to
make it work correctly (think about the triggers on the referenced table
for update and delete - which in your case with a unique index would
be safe to put the triggers on all the time in both, but some view
conditions would be such that that wouldn't be sufficient).

You *might* be able to add the triggers manually and have it work.  I
haven't tried, and wouldn't guarantee it at all...




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

Предыдущее
От: "James Orr"
Дата:
Сообщение: Referencing a view?
Следующее
От: bhuvansql@yahoo.com
Дата:
Сообщение: How can we match a condition among 2 diff. tables?