Sorry if I'm posting to the wrong list, but I don't know which list is 
appropriate for this question.

I've a question concerning compatibilty Postgres <-> Oracle. In Oracle, empty 
strings and null are basicly the same, but it does not seem to be under 
Postgres, making migration a pain.

Example:
ORACLE:
select id 
  from anytable
where field='';

POSTGRES:
select id
  from anytable
where field='' or field is null;

Or another example: The oracle query
update anytable set adatefiled=''
fails in Postgres, I've to write
update anytable set adatefield=null;

This gets really bad when the actual data is coming from a webinterface, I've 
to handle 2 different queries for the case empty string and non-empty string.

Is there a better way to achieve this?

Thanks!

Best regards,
        Mario Weilguni

Reply via email to