| От | Tom Lane |
|---|---|
| Тема | Re: Simple concatenation in select query |
| Дата | |
| Msg-id | 13672.965077557@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Simple concatenation in select query ("Sandis" <sandis@mediaparks.lv>) |
| Список | pgsql-sql |
"Sandis" <sandis@mediaparks.lv> writes:
> Ok, i got it, after all! It took > 30 min to write this query. :(
> SELECT textcat(textcat(first_name,text ' '),last_name) from table;
It's a lot easier if you use the SQL-standard concatenation operator:
regression=# select 'foo' || 'bar';?column?
----------foobar
(1 row)
textcat() just exists to implement the operator, which is why it's
not documented separately.
Dunno why you'd need to specify the type of the constant explicitly
in this context --- there is only one textcat function, so the system
ought to be able to figure it out.
regards, tom lane
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера