> Why do these discussions always end in academic arguments over whats more
> logical then not?
Because you asked the (rhetorical from your POV) question 'isn't this
more logical ?'
> From a *user's* point of view I really would like it to
> treat the NULL operand of || as '', and obviously many other (at least
> Oracle) users tend to agree with me on that.
They have to, otherwise they can't meaningfully concatenate an empty
string to anything in Oracle, because there's no such thing in Oracle...
empty string = NULL in Oracle, which is the real cause of the problem.
We've been bitten by this on Oracle before.
> If aggregates ignore NULL one could argue that so shuld the ||-operator?
OK, this is more complicated I guess, check out the rules related to
'strict' state transition functions in:
http://www.postgresql.org/docs/8.1/static/sql-createaggregate.html
Basically, if you like, you could define a 'my_sum' aggregate which does
not ignore nulls. Or you can define an operator which treats NULLs as
empty string if you like...
Cheers,
Csaba.