| От | Tom Lane |
|---|---|
| Тема | Re: big problem |
| Дата | |
| Msg-id | 26316.1015858954@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | big problem (Frank_Lupo Frank_Lupo <frank_lupo@telemail.it>) |
| Список | pgsql-general |
Frank_Lupo Frank_Lupo <frank_lupo@telemail.it> writes:
> select 'aaa'+'aaa';
> return :
> ?column?
> ----------
> ?
"+" is not the operator for concatenation. Use the SQL-standard
concatenation operator, "||".
Just FYI, what you seem to be getting is coercion to type "char"
(the single-byte char, not char(N)) and then addition of character
values.
If you really insist on spelling concatenation as "+", try
create operator + (leftarg=text, rightarg=text, procedure=textcat);
This will work better than making one for varchar because text is
the preferred string type.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера