Re: parameterized fetch

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: parameterized fetch
Дата
Msg-id 4328AA0E.7090202@opencloud.com
обсуждение исходный текст
Ответ на parameterized fetch  ("Merlin Moncure" <merlin.moncure@rcsonline.com>)
Список pgsql-hackers
Merlin Moncure wrote:
> I've noticed that trying to parameterize a fetch statement via
> ExecParams returns a syntax error:
> 
> fetch $1 from my_cursor;
> 
> This is not really a big deal, but maybe it should be documented which
> statements can be parameterized and which can't

Currently the documentation is "the backend's grammar". You can only put
parameters where there is a PARAM node, which currently means "anywhere
you can put a c_expr". So if you can replace something with an
expression, you can probably also replace it with a parameter.

-O


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

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Constraint Type Coercion issue?
Следующее
От: "Michael Paesold"
Дата:
Сообщение: Bug with cursor declaration in PL/pgSQL in CVS tip?