On Wed, Oct 18, 2006 at 03:44:05PM +0200, Andreas Joseph Krogh wrote:
> > When in doubt, consult the standard ... Oracle's treatment of NULL is
> > known to violate the standard, IIRC. Your measure of correctness seems
> > to be "appears to me more logical", but ours is "complies with the
> > standard".
> 
> I know PG violates the standard in other places and core's favourite argument 
> for doing so is "the standard is braindead here, so we do it our way".

But they're few and far between and not on things people actually
notice much.

What's being suggested simply violates common sense. Basically:

if (a = b) then (a||c = b||c)

That seems a perfectly good rule, which works for both Oracle and
PostgreSQL. Breaking seems to be a bad idea all round.

> 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".

I would argue it's inconsistant. No other function treats a NULL like
an empty string, so I really don't see why textcat() should.

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to 
> litigate.

Attachment: signature.asc
Description: Digital signature

Reply via email to