README

null - Oracle empty string emulation

This transformation module simulate one Oracle's feature. There any empty string is
same as NULL. This specific feature is visible in three cases: a) input
string literals, b) output string literals, c) string concatation via
operator || is little bit different - this operator quite ignore NULL.  

some tests

postgres=# load 'null';
LOAD
Time: 1,626 ms
postgres=# \pset null <null>
Null display is "<null>".

postgres=# select 'abcd';
 ?column? 
----------
 abcd
(1 row)

postgres=# select 'abcd' || null || '' || 'ef';
 ?column? 
----------
 abcdef
(1 row)

postgres=# select null || null;
 ?column? 
----------
 <null>
(1 row)

postgres=# select '' || '';
 ?column? 
----------
 <null>
(1 row)

postgres=# select '' || null;
 ?column? 
----------
 <null>
(1 row)

postgres=# select '';
 ?column? 
----------
 <null>
(1 row)

postgres=# select substring('abcdef' from 1 for 1);
 substring 
-----------
 a
(1 row)

postgres=# select substring('abcdef' from 10 for 1);
 substring 
-----------
 <null>
(1 row)

Checked against OracleXE.

