Re: text + text
От | David Garamond |
---|---|
Тема | Re: text + text |
Дата | |
Msg-id | 4166933D.9080308@zara.6.isreserved.com обсуждение исходный текст |
Ответ на | Re: text + text (Peter Eisentraut <peter_e@gmx.net>) |
Ответы |
Re: text + text
Re: text + text |
Список | pgsql-general |
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
В списке pgsql-general по дате отправления: