Subject Re: [firebird-support] Adding a field with NOT NULL constraint
Author Helen Borrie
>   Your last advice concerns me a bit. Is it also valid for
> changing stored procedures or triggers ?

As an abiding principle - yes. But, for SPs and triggers, the effect
varies according to a few factors. The BLR for these modules is
cached on first use. Changes conducted whilst the module is in cache
will not take effect until the cached copy is removed.

For Classic and Superclassic, each user has a private cache that
disappears when that user detaches from the database. For
Superserver, the cache is shared, so the changes will not take effect
for any user until all users detach.
>   Should I have always to disconnect every client before executing DDL sentences ?

My advice is "Yes, always". There might be some conditions where
changing things while users are online is plain sailing but how would
you know for certain? Whilst the engine may allow you to effect
changes without throwing errors or corrupting on-disk structures, it
would be difficult to assure yourself that you are not going to
corrupt the in-memory structures that users already have in place.

And, when all is said and done, assumptions about the structure of
the database objects are made in the client application and any active
request refers to the status quo when that client connected.