Re: My function run successfully with cursor, but can't change table - Mailing list pgsql-general

From Thomas Kellerer
Subject Re: My function run successfully with cursor, but can't change table
Date
Msg-id kp4vll$lis$1@ger.gmane.org
Whole thread Raw
In response to Re: My function run successfully with cursor, but can't change table  (Kevin Grittner <kgrittn@ymail.com>)
Responses Re: My function run successfully with cursor, but can't change table
List pgsql-general
Kevin Grittner wrote on 10.06.2013 15:19:
> It has nothing to do with the way you are using the cursor; your
> problem is that you are causing an error by attempting to COMMIT
> inside a function (which is not allowed).  This rolls back the
> subtransaction defined by the BEGIN/EXCEPTION block.  You then
> suppress any display of the error with the WHEN OTHERS block.

I thought you could *never* use commit (or rollback) inside a function?




pgsql-general by date:

Previous
From: Gustavo Amarilla Santacruz
Date:
Subject: Re: Postgresql - Currval Vs Session Pool
Next
From: Alvaro Herrera
Date:
Subject: Re: My function run successfully with cursor, but can't change table