Forum OpenACS Q&A: Response to Notice: Found postgres7.2 incompatibility

Collapse
Posted by Don Baccus on
Is there code in our toolkit that does this?  Ouch, it shouldn't ...

"bar = NULL" is supposed to return NULL no matter what value bar has (including NULL).  That's standard SQL 92.

Unfortunately the PG group were lobbied to change the semantics to the non-standard MySQL semantics, which returns "true" rather than "NULL" if bar equals NULL.  I was rather horrified to learn they'd done that, to be honest.

We may have accidently let some dependencies slip in, though, due to the fact that Oracle has a very non-standard conversion of '' to NULL in DML statements, and some code might explicitly say NULL since "they're the same anyway".  Very non-standard and very non-portable, but wouldn't've been easily noticed by someone porting code from Oracle to PG ...

Carl, since you're going to grep around looking for such cases could you post a report here afterwards?