| От | Tino Wildenhain |
|---|---|
| Тема | Re: Regex query not using index |
| Дата | |
| Msg-id | 47BC0176.8090305@wildenhain.de обсуждение исходный текст |
| Ответ на | Re: Regex query not using index ("Postgres User" <postgres.developer@gmail.com>) |
| Ответы |
Re: Regex query not using index
|
| Список | pgsql-general |
Postgres User wrote: > im trying to allow the client to pass a varchar param into my > function, and want to avoid any parsing of the parameter inside the > function, or code to build a sql string. > > if the function can use this code, it will be compiled and optimized > (unlike a dynamic sql stirng) > > select * from mytable where fielda ~ p_param No, you should never let users specify raw regex. at best they can hog down your server. Regex is a state engine and you can create endless loops. Maybe we can see the overall picture of your query? Regards Tino
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера