Re: Question about Oracle compatibility - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Question about Oracle compatibility
Date
Msg-id 11339.975347086@sss.pgh.pa.us
Whole thread Raw
In response to Question about Oracle compatibility  (Mario Weilguni <mweilguni@sime.com>)
Responses Re: Question about Oracle compatibility  (Don Baccus <dhogaza@pacifier.com>)
List pgsql-hackers
Mario Weilguni <mweilguni@sime.com> writes:
> In Oracle, empty strings and null are basicly the same,

Are you sure about that?  It'd be a pretty major failure to comply with
SQL standard semantics, if so.

SQL92 3.1 (Definitions):
           null value (null): A special value, or mark, that is used to           indicate the absence of any data
value.

SQL92 4.1 (Data types)
        A null value is an implementation-dependent special value that        is distinct from all non-null values of
theassociated data type.        There is effectively only one null value and that value is a member        of every SQL
datatype. There is no <literal> for a null value,        although the keyword NULL is used in some places to indicate
thata        null value is desired.
 

There is no room there for equating NULL with an empty string.  I also
read the last-quoted sentence to specifically forbid treating the
literal '' as NULL.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alex Perel
Date:
Subject: Re: Question about Oracle compatibility
Next
From: "Ross J. Reedstrom"
Date:
Subject: Re: Re: [NOVICE] Re: re : PHP and persistent connections