Jay A. Kreibich wrote:
> I can also see situations when someone might want to run one
> set or the other set of checks. Breaking it out, so that these
> checks are done by a different PRAGMA (integrity_check_v2 ?) seems
> like a wise idea.
Indeed; with a separate PRAGMA fk_integrity_check, it would be possible
to run the check even when foreign keys are not currently enabled.
This would be a useful thing to do just before enabling foreign keys.
Isn't something else than a pragma more appropiate?
SELECT consistency_check() FROM mytable;
would return rows from a specific table where any constraint, unicity
or FK is violated:
rowid | constraint_name | diag_code
SELECT consistency_check_all();
would return rows from every table in turn where any constraint,
unicity or FK is violated:
table_name | rowid | constraint_name | diag_code
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users