Greg Stark <stark(at)mit(dot)edu> writes:
> The missing bit of context is that concat() is there because early on
> in Postgres's life there was an effort to have a full suite of Oracle
> compatibility functions. If someone suggested it now they would be
> pushed towards making it an extension or pointed at EDB. But things
> like concat are the remnants of that.
Well, that's historical revisionism, because concat() was added in 9.1.
But if it was defined this way for Oracle compatibility, that makes
sense, because Oracle doesn't distinguish NULL from empty strings.
So they pretty much would have to make concat() treat NULL as empty.
regards, tom lane