Re: Access to dynamic SQL in PL/pgSQL

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Access to dynamic SQL in PL/pgSQL
Дата
Msg-id 4B598E59.7040909@enterprisedb.com
обсуждение исходный текст
Ответ на Access to dynamic SQL in PL/pgSQL  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: Access to dynamic SQL in PL/pgSQL  (Simon Riggs <simon@2ndQuadrant.com>)
Список pgsql-hackers
Simon Riggs wrote:
> It's not currently possible to access the SQL used in a dynamic PL/pgSQL
> statement using a PL/pgSQL plugin.
> 
> In src/pl/plpgsql/src/pl_exec.c's exec_stmt() we call each dynamic
> statement type, evaluate the SQL and free memory again before the plugin
> gains control again.
> 
> It seems simple to attach querystr to PLpgSQL_execstate and free it
> after the plugin has seen it. The difference in lifetime of the memory
> allocation is very small.

Is this for pl/debugger? How would you use the query string there?

--  Heikki Linnakangas EnterpriseDB   http://www.enterprisedb.com


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Streaming Replication on win32
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Access to dynamic SQL in PL/pgSQL