Subject | Re: [Firebird-Architect] Nulls in CHECK Constraints |
---|---|
Author | Dmitry Yemanov |
Post date | 2005-10-26T09:59:03Z |
"Martijn Tonies" <m.tonies@...> wrote:
restriction?
This is what I see, for example:
a) If T is a persistent base table, or if the <check constraint definition>
is contained in a <domain definition>
or <alter domain statement>, then no <table reference> generally contained
in the <search condition>
shall reference a temporary table.
For me, it implicitly means that <table reference>s to persistent tables are
allowed. Also, feature F671 explicitly allows subqueries in the <search
condition>. Do you think they're limited to the host table only? I doubt
that.
Our inconsistency is that a check constraint may select from stored
procedures that modify data. This clearly violates the standard. As for
check constraints being multi-table, I'm not sure this is aganst the spec.
another table.
referencing other tables.
Dmitry
>Do you have a page reference inside SQL-2003 which explicitly states this
> One other thing about our Check Constraints:
> They allow access to other tables.
>
> This is prohibited in the SQL (2003) standard
restriction?
This is what I see, for example:
a) If T is a persistent base table, or if the <check constraint definition>
is contained in a <domain definition>
or <alter domain statement>, then no <table reference> generally contained
in the <search condition>
shall reference a temporary table.
For me, it implicitly means that <table reference>s to persistent tables are
allowed. Also, feature F671 explicitly allows subqueries in the <search
condition>. Do you think they're limited to the host table only? I doubt
that.
Our inconsistency is that a check constraint may select from stored
procedures that modify data. This clearly violates the standard. As for
check constraints being multi-table, I'm not sure this is aganst the spec.
> as a check constraint should be a row constraint.A referential integrity constraint is also a row one, but it does reference
another table.
> I guess this is an implementation errorSome our users would disagree :-)
> given that Firebird checkIMO, this is another issue.
> constraints aren't evaluated completely if, for example, you delete
> a row in the table.
> The SQL standard says, I believe, that there's an "assertion" objectCorrect. Although I don't see how this restricts check constraints from
> which can be used for table or database (multi-table) constraint.
referencing other tables.
Dmitry