Question about Oracle compatibility

Поиск
Список
Период
Сортировка
От Mario Weilguni
Тема Question about Oracle compatibility
Дата
Msg-id 00112718095200.00894@wotan
обсуждение исходный текст
Ответы Re: Question about Oracle compatibility  (Alex Perel <veers@webhosting.com>)
Re: Question about Oracle compatibility  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Question about Oracle compatibility  (Don Baccus <dhogaza@pacifier.com>)
Re: Question about Oracle compatibility  (Pete Forman <pete.forman@westgeo.com>)
Список pgsql-hackers
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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Marko Kreen
Дата:
Сообщение: Re: Re: [GENERAL] Warning: Don't delete those /tmp/.PGSQL.* files
Следующее
От: Alex Perel
Дата:
Сообщение: Re: Question about Oracle compatibility