Subject Re: [firebird-support] Stored procedure update problem ?
Author Lucas Franzen
Fabrice,


> I need to recreate this procedure if I need it to work with my new field
> adress :
> alter procedure COPYC
> as
> begin
> insert into zcustomer
> select * from customer;
> end
>
>
> Why I need to do that ? and why firebird don't return me an "dependancie
> error" when I try to alter customer and zcustomer table use in a procedure ?
> Why a stored procedure with an "select *" isn't auto refreshed ?

Because StoredProcedures are compiled and then saved (as BLR) in the
database, so they can be executed very fast.

Thus changing a table will NOT recompile the StoredProcs that are
referencing this table.

You have to do on your own.

The same goes for (ie) altering an index.
The StoredProc won't use a new and better plan (if you have a new and
better indexing) unless you recompile it.

Luc.