| От | Tom Lane |
|---|---|
| Тема | Re: rtrim giving weird result |
| Дата | |
| Msg-id | 14489.984680337@sss.pgh.pa.us обсуждение |
| Ответ на | Re: rtrim giving weird result ("Ross J. Reedstrom" <reedstrm@rice.edu>) |
| Ответы |
Re: rtrim giving weird result
|
| Список | pgsql-hackers |
"Ross J. Reedstrom" <reedstrm@rice.edu> writes:
>> Is there a way to just remove the "_opto" from the end of the string?
> If you have exactly one known string to (optionally) remove, this works
> (and even works if the string is missing. Watch out for the early
> occurance of substring problem, though!):
> test=# select substr('center_out_opto',1,(strpos('center_out_opto','_opto')-1));
My first thought for any moderately complicated string-bashing problem
is to write a function in pltcl or plperl ... they are much stronger in
string manipulation than SQL itself is.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера