Re: OOP real life example (was Re: Why is MySQL more

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Hannu Krosing <hannu@tm.ee>
Cc: Curt Sampson <cjs@cynic.net>, Bruce Momjian <pgman@candle.pha.pa.us>, Don Baccus <dhogaza@pacifier.com>, Lamar Owen <lamar.owen@wgcr.org>, Greg Copeland <greg@CopelandConsulting.Net>, PostgresSQL Hackers Mailing List <pgsql-hackers@postgresql.org>
Date: 2002-08-14T14:42:21Z
Lists: pgsql-hackers
Hannu Krosing <hannu@tm.ee> writes:
> Agreed. Most of this would be easy to implement for curent
> implementation (but perhaps no more efficient than when done by manually
> added rules/triggers) if constraints could contain subqueries.

I don't understand what a constraint containing a subquery means.
Does it constrain the table(s) referenced by the subquery too?  If not,
what's the point --- adding, dropping or altering rows in the referenced
table might make the constraint condition false.  If it does constrain
the referenced tables, how the heck are you going to implement that in a
reasonable fashion?

			regards, tom lane