Subject | RE: [IBDI] Adding a NOT NULL column to a table |
---|---|
Author | Dmitry Yemanov |
Post date | 2001-07-04T09:44:17Z |
Hi Dmitry,
changed metadata and/or data in the working database, so this area is quite
known to me. I was simply wondering about accordance of the described
functionality to the SQL standard.
Cheers,
Dmitry
> You are returning to the question that was rejected aboutAgree. I do incremental upgrade in my apps, executing scripts to update all
> half of a year ago.
>
> if engine will populate values, it will be horror for big tables - do
> you want to wait ~1 hour while "alter table add field int not
> null" will be
> completed?
>
> Also there was a suggestion to disable such feature, i.e. to
> disable adding
> new not null fields to non-empty tables.
>
> That's why common decision was: this feature is dangerous is
> some situations,
> when developer FORGOT to populate new not null column with
> correct data.
> It is not always possible to fill not null with default data
> (in case of
> FOREIGN KEY that does not have corresponding record for
> default value).
> But, let this feature live, and let developers REMEMBER about
> all problems
> that can be in case of INCOMPLETE work.
>
> I mean, if you add NOT NULL column to new column you must
> understand what are
> you doing and must remind yourself to FILL this column with
> appropriate data.
changed metadata and/or data in the working database, so this area is quite
known to me. I was simply wondering about accordance of the described
functionality to the SQL standard.
Cheers,
Dmitry