Subject Re: [firebird-support] Alter views with dependencies
Author Urs Liska
rj1102 schrieb:
>
> One big problem with views is that you can not alter a view if there
> are other views dependent on it.
> You have to drop all dependent views (and views that are dependent on
> the dependent views, etc), then alter the main view and create all
> dependent views again.
>
> Is there a tool to do this automatically?
>
> Or even better: are there plans to support the alteration of views
> with dependecies?
> I have already seen a Request for Enhancement/Feature for this in the
> tracker (#807979), but it seems very old and forgotten.
>
> In most cases the dependencies after the alteration of the view are
> the same as before the alteration (f.e. in case I only change the
> where clause or add fields to the select clause). So maybe it is
> hopefully:) not too difficult to change Firebird to support this
> cases.
>
> Thanks,
> Robert
>
IBExpert helps you with this.
It has an option "Recreate Script" that you can call for a changed view.
What it does is exactly what you described: it creates a script that
drops all dependent objects changes your view and then recreates all
dropped objects.
Works very well.

HTH
Urs