BUG #14240: i want do manual commit not auto_commit.
The following bug has been logged on the website:
Bug reference: 14240
Logged by: Zubair Alam
Email address: zzia88@gmail.com
PostgreSQL version: 9.5.3
Operating system: windows7-x64(64 bit)
Description:
CREATE OR REPLACE FUNCTION DELROLL(V_CHOICE INT)
RETURNS INT AS $V_CHOICE$
BEGIN
IF V_CHOICE=1 THEN
DELETE FROM ITEMS
WHERE itemid=4;
END IF;
IF V_CHOICE=2 THEN
ROLLBACK;
--COMMIT;
END IF;
RETURN V_CHOICE;
END;
$V_CHOICE$
LANGUAGE PLPGSQL;
when i am doing auto commit off the it is giving some internal error.
please check this code with commit.
i want to flash my rollback segment automatically.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
On Sun, Jul 10, 2016 at 2:38 PM, <zzia88@gmail.com> wrote:
CREATE OR REPLACE FUNCTION DELROLL(V_CHOICE INT)
...
ROLLBACK;
--COMMIT;
Does not seem like a bug, IIRC commit/rollback is not allowed inside
functions ( savepoints are, you may try to work with them ).
when i am doing auto commit off the it is giving some internal error.
This sentence does not make sense. If you mean it is giving some error
when your try it with autocommit off, try to copy and paste the error.
please check this code with commit.
i want to flash my rollback segment automatically.
Are you sure you are using postgres? AFAIK it does not hace a rollback
segment to ''flash'', this sound more like Oracle or similar things.
Francisco Olarte.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs