Forum OpenACS Q&A: Response to String concatenation w/nulls

Collapse
Posted by David Walker on
I agree with you about using nonstandard extensions. I'll try to avoid them in any code I write that may become part of OpenACS.

I think "nothing" vs "unknown" is just semantics, so long as it's understood that NULL != 0 and NULL != ''. While returning NULL if one side of an operator is NULL is logical for most operators, I can certainly see the use of having a string concatenation operator (in addition to, not instead of, the one we have now) that treats NULL as empty string.

That being said, perhaps a better solution would be to change the database schema in some places so that certain fields default to '' instead of NULL or to make sure the '' is there in the INSERT statement.