|Subject||Re: [firebird-support] Altering a domain|
|Author||Walter R. Ojeda Valiente|
Excellent explanation Ann, as always. Just one doubt:
After a cycle backup/restore: the restored database will have all the rows with the new domain?
All columns with domain D_CURRENCY that were created with DECIMAL(9, 2) now will be DECIMAL(18, 2) ?
On Tue, Jun 16, 2015 at 2:58 PM, Aldo Caruso aldo.caruso@... [firebird-support] <email@example.com> wrote:
thank you very much for your clear explanation.
El 16/06/15 a las 12:44, Ann Harrison aharrison@... [firebird-support] escibió:
On Tue, Jun 16, 2015 at 11:15 AM, Aldo Caruso aldo.caruso@... [firebird-support] <firstname.lastname@example.org> wrote:
I have defined the following domain :
CREATE DOMAIN CURRENCY AS decimal(9,2)
I would like to alter it as the following :
ALTER DOMAIN CURRENCY AS decimal(18,2)
I have many fields in tables that depend on this domain and they
are filled with values.
Will they be restructured in their internal representation ( from
INTEGER to BIGINT in dialect 3 ) with no harm for the stored data ?
Initially, only the domain and column definitions will change, creating newformat versions for the tables affected. When you insert new records intothose tables, the new records will have the new format. Old records willbe changed in memory when you read them, so they appear to be in thenew format. The stored format of existing records change when therecords are modified.