Subject | Re: [firebird-support] Altering a domain |
---|---|
Author | Walter R. Ojeda Valiente |
Post date | 2015-06-19T19:32:46Z |
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) ?
Greetings.
Walter.
On Tue, Jun 16, 2015 at 2:58 PM, Aldo Caruso aldo.caruso@... [firebird-support] <firebird-support@yahoogroups.com> wrote:Ann,
thank you very much for your clear explanation.
Aldo
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] <firebird-support@yahoogroups.com> 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.
Good luck,
Ann