Re: Planning error in dynamic string creation in plpgsql
В списке pgsql-general по дате отправления:
| От | Adrian Klaver |
|---|---|
| Тема | Re: Planning error in dynamic string creation in plpgsql |
| Дата | |
| Msg-id | 52CA35F5.3010705@gmail.com обсуждение исходный текст |
| Ответ на | Re: Planning error in dynamic string creation in plpgsql (Keith Fiske <keith@omniti.com>) |
| Список | pgsql-general |
On 01/05/2014 08:43 PM, Keith Fiske wrote: > I can't remove the quote_literal() because the value could potentially > be a string, time, or number. Without the loop, quote_literal() handles > the variable being any one of those types without any issues and quotes > (or doesn't) as needed. Well I tried it in your example function and it seemed to work. I don't think it is quote_literal that is the problem, it is the assignment to v_sql. In the FOREACH it seems v_sql is not being replanned. In the other loop there two instances of it and they segregated by type at the start so they do not suffer the planning issue with types. > > -- > Keith Fiske > Database Administrator > OmniTI Computer Consulting, Inc. > http://www.keithf4.com -- Adrian Klaver adrian.klaver@gmail.com
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера