From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Access to dynamic SQL in PL/pgSQL |
Date: | 2010-01-22 11:00:35 |
Message-ID: | 1264158035.4043.14298.camel@ebony |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, 2010-01-22 at 11:41 +0100, Pavel Stehule wrote:
> 2010/1/22 Simon Riggs <simon(at)2ndquadrant(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2010-01-22 11:34:26 | Re: Streaming Replication on win32 |
Previous Message | Pavel Stehule | 2010-01-22 10:41:54 | Re: Access to dynamic SQL in PL/pgSQL |