Re: insert empty strings in ESQL/C
Posted in 1998
I just ran a test program, and it appears that you are indeed correct. Don't know what I was smoking... Art S. Kagel wrote in message <36432FA4.7510@bloomberg.net>... >Nope. In ESQL/C you can insert any garbage you want into a char column. >I know my predecessor designed a database with 31 prices encoded as >either scaled integers or smallfloats packed into a single 128 >character column. Notice the extra four bytes? That's because the >first byte CANNOT be null or the engine interprets the entire column as >null (that is how Informix indicates a NULL char string on disk just >like it uses MIN_LONG for an integer NULL ever notice the value range >for Informix integers?) so he forced the first byte to all 1 bits, the >remaining 3 bytes to maintain data alignment for the packed integers. >Once the string with a lead null is accepted by the engine (and it will >be) it is interpreted as a NULL column on retrieval. Sorry you are >just incorrect. This has been the way Informix char columns have >worked for the entire 17 years I've been using the products. > >Art S. Kagel