Re: SET prepared statement

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: SET prepared statement
Дата
Msg-id CAKFQuwbMaoO9=VUY1K0Nz5YBDyE6YQ9A_A6ncCxD+t0yK1AxJg@mail.gmail.com
обсуждение исходный текст
Ответ на SET prepared statement  (Oliver Kohll <oliver@agilechilli.com>)
Ответы Re: SET prepared statement  (Oliver Kohll <oliver@agilechilli.com>)
Список pgsql-general
On Wed, Apr 13, 2016 at 8:38 AM, Oliver Kohll <oliver@agilechilli.com> wrote:
Hello,

We currently use prepared statements for most of the work an app does, as an SQL injection protection and for other reasons.

There's one statement which can't be prepared:

SET LOCAL myprefix.mysetting = 'my setting value';

Ideally, I'd like to be able to do

PREPARE test(text) as SET LOCAL myprefix.mysetting = $1;

but this isn't supported (currently on PG 9.3)

I suspect the answer is 'no' but no harm in asking if it's likely to be considered in future. I can't see it here: https://wiki.postgresql.org/wiki/Todo


​Given that you can simply use the "set_config(...)" function I'd say that this command will have not particular in the decision work on improving this limitation in the system.


​David J.​

В списке pgsql-general по дате отправления:

Предыдущее
От: Alex Ignatov
Дата:
Сообщение: Re: Freezing localtimestamp and other time function on some value
Следующее
От: Alex Ignatov
Дата:
Сообщение: Re: Freezing localtimestamp and other time function on some value