Re: Access to dynamic SQL in PL/pgSQL

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: Access to dynamic SQL in PL/pgSQL
Дата
Msg-id 1264158035.4043.14298.camel@ebony
обсуждение исходный текст
Ответ на Re: Access to dynamic SQL in PL/pgSQL  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On Fri, 2010-01-22 at 11:41 +0100, Pavel Stehule wrote:
> 2010/1/22 Simon Riggs <simon@2ndquadrant.com>:
> >
> > 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.
> 
> can you show some example, please?

exec_stmt_dynexecute() evaluates querystr at start and pfrees it before
end of exec_stmt_dynexecute(). So plugin never gets to see the SQL
executed.

-- Simon Riggs           www.2ndQuadrant.com



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

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