Re: Foreign keys/unique values and views

Поиск
Список
Период
Сортировка
От Einar Karttunen
Тема Re: Foreign keys/unique values and views
Дата
Msg-id Pine.LNX.4.30.0103221557480.20824-100000@melkinpaasi.cs.Helsinki.FI
обсуждение исходный текст
Ответ на Re: Foreign keys/unique values and views  ("Richard Huxton" <dev@archonet.com>)
Ответы Re: Foreign keys/unique values and views
Re: Foreign keys/unique values and views
Список pgsql-general
On Thu, 22 Mar 2001, Richard Huxton wrote:
>
> I have to admit I've never tried referencing a view with a foreign key. I
> don't know if it's possible and I have to admit the idea makes me
> uncomfortable. Can't give a good reason why, but I'd apply constraints at
> the table level.
if one can reference a table with a foreign key it makes possible to
reference inheritance hierarchies. If I create a view from the parent
with CREATE VIEW name SELECT * FROM parent; (in v.7.1) it should contain
the entries from the children as well. Now if I could reference this view
I could simulate referencing parent and child tables easily.
What I have in mind is a hierarchy of persons all inheriting from a table
called person. Different kinds of persons have different attributes but
all have an id and name. What I want is that other tables could reference
these persons easily.

- Einar Karttunen



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

Предыдущее
От: "Richard Huxton"
Дата:
Сообщение: Re: Changing from rpm to Compiled version
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: String REPLACE function