SET prepared statement

Поиск
Список
Период
Сортировка
От Oliver Kohll
Тема SET prepared statement
Дата
Msg-id D2A07336-827A-4F1B-938B-7FFF4F804F59@agilechilli.com
обсуждение исходный текст
Ответы Re: SET prepared statement  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-general
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

Oliver

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

Предыдущее
От: CS DBA
Дата:
Сообщение: Re: Fastest way to duplicate a quite large database
Следующее
От: Alex Ignatov
Дата:
Сообщение: Re: Freezing localtimestamp and other time function on some value