sridhar bamandlapally wrote
> In application code is
>
> while inserting/updating: INSERT/UPDATE into ... ( '' ) - which is empty
> string in PG, and in Oracle its NULL
>
> while selecting: SELECT ... WHERE column IS NULL / NOT NULL
>
> the issue is, while DML its empty string and while SELECT its comparing
> with NULL
If this is the extent of your problem then you can add table triggers to
change the empty-string input so that the result of the insert/update is
NULL. Then all of your selects can use IS NULL for their comparisons just
like they do now.
That is as "implicit" as you are going to get without actually fixing the
underlying problem.
David J.
--
View this message in context: http://postgresql.nabble.com/empty-string-Vs-NULL-tp5837188p5837308.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.