Re: Planning error in dynamic string creation in plpgsql

Поиск
Список
Период
Сортировка
От 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 по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: Planning error in dynamic string creation in plpgsql
Следующее
От: Jayadevan M
Дата:
Сообщение: Re: authentication failure