Re: pass open cursor via USING in execute staement

Поиск
Список
Период
Сортировка
От Laurenz Albe
Тема Re: pass open cursor via USING in execute staement
Дата
Msg-id 5c247f374cd29995f4161d02ed104c1052660509.camel@cybertec.at
обсуждение исходный текст
Ответ на pass open cursor via USING in execute staement  (PG Doc comments form <noreply@postgresql.org>)
Ответы Re: pass open cursor via USING in execute staement  (Lorusso Domenico <domenico.l76@gmail.com>)
Список pgsql-docs
On Wed, 2023-05-31 at 22:57 +0000, PG Doc comments form wrote:
> Page: https://www.postgresql.org/docs/15/plpgsql-statements.html
>
> Should be documented if this statement is allowed or not (if not, maybe set
> as desired feature :-) )
>
> EXECUTE format('update %I set col1=$1, col2=now() WHERE current of $3',
> tabname)
>    USING myVal, myOpenCursor;

That is not supported.  Parameters can only be used in a place where constants
(SQL literals) might appear, not instead of identifiers (names of tables, columns etc.)

I looked, and that is really not documented anywhere.
One of PREPARE or the extended query protocol might be good places.

Yours,
Laurenz Albe



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

Предыдущее
От: PG Doc comments form
Дата:
Сообщение: pass open cursor via USING in execute staement
Следующее
От: Lorusso Domenico
Дата:
Сообщение: Re: pass open cursor via USING in execute staement