Re: BUG #12690: EXECUTE statement fails with dynamic column name on record variable

Поиск
Список
Период
Сортировка
От Marko Tiikkaja
Тема Re: BUG #12690: EXECUTE statement fails with dynamic column name on record variable
Дата
Msg-id 54C9FBB8.4070502@joh.to
обсуждение исходный текст
Ответ на BUG #12690: EXECUTE statement fails with dynamic column name on record variable  (patrick@vanlaake.net)
Список pgsql-bugs
On 2015-01-28 11:18, patrick@vanlaake.net wrote:
> EXECUTE 'SELECT th.' || quote_ident(period) INTO times;
>
> In this specific context the parser seems to not support or disallow the use
> of a record variable. Is this a bug ?

No.  It has nothing to do with the type of the variable; PL/PgSQL
variables are not visible to the query being EXECUTEd at all.  See
http://www.postgresql.org/docs/9.4/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-EXECUTING-DYN,
specifically the part:

"No substitution of PL/pgSQL variables is done on the computed command
string. Any required variable values must be inserted in the command
string as it is constructed; or you can use parameters as described below."


.m

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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: RLS bug?
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #12694: crash if the number of result rows is lower than gin_fuzzy_search_limit