From: | Oliver Elphick <olly(at)lfix(dot)co(dot)uk> |
---|---|
To: | Curt Sampson <cjs(at)cynic(dot)net> |
Cc: | Zeugswetter Andreas SB SD <ZeugswetterA(at)spardat(dot)at>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Copeland <greg(at)CopelandConsulting(dot)Net>, Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, PostgresSQL Hackers Mailing List <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Inheritance |
Date: | 2002-08-19 15:06:27 |
Message-ID: | 1029769587.19817.37.camel@linda |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(dot)Elphick(at)lfix(dot)co(dot)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 to him that knocketh it shall be
opened." Luke 11:10
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Copeland | 2002-08-19 15:10:57 | Re: Inheritance |
Previous Message | Curt Sampson | 2002-08-19 14:42:51 | Re: Inheritance |