Your 3 DREAM FEATURE for Vstudio ?

Ivan Smahin IvanSmahin at public.kherson.ua
Wed Jun 22 13:45:04 CDT 2005


Hello Serge,

Wednesday, June 22, 2005, 8:54:14 AM, you wrote:




S> On 6/22/05 7:36 AM, "Ruslan Zasukhin"
S> <sunshine at public.kherson.ua> wrote:

>> On 6/21/05 9:37 PM, "Heinrich Ruoff" <heinrichruoff at gmail.com> wrote:
>>> what about default strings - how do they work?
>>> myText text(512) DEFAULT 'default string'
>>> didn't work
>> 
>> Sergey check this. I have no answer from him yet.

S> I added it to mantis   -  892

Actually - it does not work for BLOB.
Text field is some sort of BLOB.
You know that in many systems it's called CLOB (character large object).
And it is not allowed to have default value for such fields.

Here is a couple reasons but most of it is:

What is the sense to make some default value for TEXT?

What is it can be? If you choose TEXT type you want to store a really large peaces of
information - not a "short" string.


Another reason is:
You should know that any value putted to the BLOB field ( TEXT in particular )
will eat at least one segment per record. Assume you choose 4K as segment size.
So, 4K will be used to store your default value (something like "aaa") if you
do something like "INSERT INTO t1 DEFAULT VALUES". Obviously, it is very ineffective.


So
Currently we does not allow DEFAULT for any BLOB. But we just silently ignore it.
Probably it would be better to throw some exception in this case?


What do you think about it?



-- 
Best regards,
 Ivan                            mailto:IvanSmahin at public.kherson.ua



More information about the Valentina-beta mailing list