Em 24/03/2017 11:19, Vlad Khorsun escreveu:
> 24.03.2017 16:03, Adriano dos Santos Fernandes wrote:
>> Em 24/03/2017 03:33, Vlad Khorsun escreveu:
>>
>>>
>>>    Another example - i add not null column with wrong default value and
>>> going to correct this wrong default value. Should i update whole table
>>> to do it ?
>>>
>>
>> Drop the column and recreate it, fixing your error.
> 
>    And make two more record formats - no, thanks
> 

So, test your changes and don't make mistakes.

Firebird will not have incorrect behaviour so users do not create more
record formats.

Or better, increase the record format count, which seems as a stupid limit.


>>>>  From another side, storing the default value inside the format is a
>>>> smart hack that allows to avoid updating the table. It was designed to
>>>> act like an implicit update but without the overhead. And considering
>>>> the update semantics, the new behaviour may look correct.
>>>
>>>    Also true
>>>
>>>> The big question is what expectations are better suitable to our users.
>>>
>>>    The one that already works for years and well known ? ;)
>>>
>>
>> You mean, that behaviour that a default uses CURRENT_TIME and every time
>> you select it you see a different value?
> 
>    You should know that default value for CURRENT_TIME (or any other allowed)
> expression will be value of that expression evaluated at the DDL statement
> run time.
> 

You should known how bad this worked before the change that fixed it
with the current behaviour.

BTW, don't mix implementation details with expected results, please,
this is wasting time.

Correct result is priority, and current implementation detail does it
very well (until you create a wrong default and want to fix it in the
incorrect way).


Adriano

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to