Forum OpenACS Development: Response to Porting update procedures from oracle to pg

Collapse
Posted by Don Baccus on
Additionally ... yes, PG handles NULLs correctly as defined by SQL92, which Oracle does not.  In insert and update statements Oracle treats the empty string ('') as NULL.  The correct SQL92 definition is that the empty string is, well, the empty string and NULL represents an unknown value.  This is consistent with other datatypes - SQL92 is very explicit on the issue.

Setting the attr NULL in this case should be OK.  Code using it, even Oracle code, should be using "IS NULL" since the empty string is *not*  treated as NULL in comparisons, etc.