On Mon, Mar 16, 2015 at 4:23 PM, Little, Doug C
<Doug.Little@vend.frb.org> wrote:
> insert into x select … from y;
>
>
>
> insert into log(message, code,timestamp) values('insert into
> x',:SQLSTATE,now());
>
>
I'm pretty sure you have to wrap it into a plpgsql function:
http://www.postgresql.org/docs/current/static/plpgsql-control-structures.html
Moreover, if the command executes correctly you would have no
exception and sql state will be 0.
Hope this helps.
Luca