Re: bug or feature, || -operator and NULLs

From: Neil Conway <neilc(at)samurai(dot)com>
To: Andreas Joseph Krogh <andreak(at)officenet(dot)no>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: bug or feature, || -operator and NULLs
Date: 2006-10-18 14:25:37
Message-ID: 1161181537.5719.42.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 2006-10-18 at 15:44 +0200, Andreas Joseph Krogh wrote:
> I'm not advocating that NULL should have a string-vaule of anything, just that
> the ||-operator shuld treat NULL as "dont bother with it and proceed
> concatenation".

Not only is the current behavior more logical (IMHO) and backward
compatible with existing Postgres application, it is consistent with the
SQL spec and most non-broken implementations of it. I think your chances
of getting the default behavior changed are slim indeed.

I think a more sensible proposal could be made for some sort of optional
"compatibility mode", as has been discussed many times in the past:
different NULL handling could theoretically be part of an Oracle SQL
dialect.

-Neil

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Lukas Kahwe Smith 2006-10-18 14:35:25 Re: bug or feature, || -operator and NULLs
Previous Message Csaba Nagy 2006-10-18 14:21:28 Re: bug or feature, || -operator and NULLs