'' <> NULL

From: "Cristian Custodio" <crstian(at)terra(dot)com(dot)br>
To: <pgsql-general(at)postgresql(dot)org>
Subject: '' <> NULL
Date: 2003-03-24 23:45:00
Message-ID: 002801c2f25f$64b4a350$fb01a8c0@ttcristian
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I work with Oracle and to it,
a empty quote concatenation is equal NULL.

ORACLE:
select 1 from dual where '' is null
Result: 1
select 1 from dual where trim(' ') is null
result: 1
insert into tabela values ('')
result: insert a value null in a table

POSTGRE
select 1 where '' i snull
Result: NULL
select 1 where trim(' ') is null
result: NULL
insert into tabela values ('')
result: insere '' in table

We can't change all ours source code
bacause there are very occurrences.

Does anybody here in this forum, and that work
with Oracle already resolve this?

Are there any way to change the PG to equal
'' like NULL?

Cristian

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karen Grose 2003-03-25 00:19:11 Non Identifying Foreign Key Relationships
Previous Message Hewi Yoatl 2003-03-24 22:32:43 database migration