| От | Tom Lane |
|---|---|
| Тема | Re: SIMILAR TO |
| Дата | |
| Msg-id | 6862.1287239414@sss.pgh.pa.us обсуждение |
| Ответ на | SIMILAR TO (Rommel the iCeMAn <icecrew@gmail.com>) |
| Список | pgsql-sql |
Rommel the iCeMAn <icecrew@gmail.com> writes:
> I use the following code to detect alphanumeric strings:
> IF _my_variable SIMILAR TO '^[a-zA-Z0-9]+$' THEN
> � � � � // do stuff here
> END IF;
> In pg8.4 this worked perfectly. I upgraded to pg9.0 and it no longer
> works. From the release notes it appears that the behavior of SIMILAR
> TO has changed in pg9.0. My question is, how do I modify my code so
> that it works in 9.0?
Drop the ^ and $; they are incorrect for SIMILAR TO.
regards, tom lane
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера