Peter Eisentraut wrote:
What is "text + text" supposed to do right now?
Nothing.
Then are these bugs? (7.4.5 and 8.0.0beta1 give same results). Frankly,
the current behaviour is quite strange to me.
------------------
=# select coalesce('1'+'0','NULL');
a
=# select coalesce('1'+'1','NULL');
b
=# select coalesce('1'+'3','NULL');
d
=# select coalesce('a'+'0','NULL');
=# select coalesce('a'+'1','NULL');
=# select coalesce('a'+'3','NULL');
=# select coalesce('a'+'x','NULL');
Ù
------------------
What about making "text + text" as an equivalent for "text
|| text"? Most strongly-typed programming languages do this. And MS SQL
Server too, I think (CMIIW).
What would this gain except for bloat? It's not like SQL is utterly
compatible with any programming language; users will still have to learn all
the operators anyway.
I personally don't consider this "bloat". We already have other synonyms
like '!=' and '<>'. '+' is very natural to mean concatenation for strings.
Anyway, either emitting an error or string concatenation is better than
the current behaviour, I think.
--
dave
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to
ma*******@postgresql.org so that your
message can get through to the mailing list cleanly