Subject Re: check constraint stops working after backup and restore
Author Ian A. Newby
Hi All,

> >Maybe. I haven't read anything like that anywhere. When I
recompile the
> >domain constraint, it works. Wouldn't it be better if it could
work that
> >way even after restore ? :-)
>
> How could it? Restore has to create the domains before it creates
the
> tables, otherwise it couldn't create the tables.

Although no currently possible, this could I believe be overcome
with changes to the backup mechanism (and metadata extraction).
Domains could be created without check constraints with the check
constraints being added later, after the tables have been created.

This is I believe similar to the approach done with foreign keys,
which I think are added after the tables have been restored.

There are cases where foreign keys can't be applied, such as to a
view, where this approach may be valid.

> God has the same problem with chickens and eggs.

If you believe Darwin, the egg came first (it was laid by something
not quite a chicken!)

Regards
Ian Newby