Re: Inheritance

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: Inheritance
Дата
Msg-id 1029769587.19817.37.camel@linda
обсуждение исходный текст
Ответ на Re: Inheritance  (Curt Sampson <cjs@cynic.net>)
Список pgsql-hackers
On Mon, 2002-08-19 at 15:42, Curt Sampson wrote:
> > A local constraint should be made obvious from looking at the schema,
> 
> Ok, this now I could live with. Though I'm not sure that its
> theoretically very defensible, or worth the effort. Other languages
> that offer constraints, such as Eiffel (and soon Java), do not allow
> constraints that are not inherited, as far as I know. Do you have some
> counterexamples.

In Eiffel, at least, I can say "invariant feature_x" and redefine
feature_x in a descendant class, thus effectively redefining the
constraint.  If we decide to inherit constraints unconditionally, the
application writer can achieve similar flexibility by moving the logic
of the constraint into a function whose behaviour depends on which table
it is used on.  This would put the burden on the application rather than
requiring additional syntax in PostgreSQL.

-- 
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                            
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
========================================   "For every one that asketh receiveth; and he that      seeketh findeth; and
tohim that knocketh it shall be      opened."                         Luke 11:10 
 



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

Предыдущее
От: Curt Sampson
Дата:
Сообщение: Re: Inheritance
Следующее
От: Greg Copeland
Дата:
Сообщение: Re: Inheritance