pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #14240: i want do manual commit not auto_commit.
2+ messages / 2 participants
[nested] [flat]
* BUG #14240: i want do manual commit not auto_commit.
@ 2016-07-10 12:38 zzia88@gmail.com
0 siblings, 1 reply; 2+ messages in thread
From: zzia88@gmail.com @ 2016-07-10 12:38 UTC (permalink / raw)
To: pgsql-bugs
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
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #14240: i want do manual commit not auto_commit.
@ 2016-07-10 15:22 Francisco Olarte <folarte@peoplecall.com>
parent: zzia88@gmail.com
0 siblings, 0 replies; 2+ messages in thread
From: Francisco Olarte @ 2016-07-10 15:22 UTC (permalink / raw)
To: zzia88@gmail.com; +Cc: 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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2016-07-10 15:22 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-07-10 12:38 BUG #14240: i want do manual commit not auto_commit. zzia88@gmail.com
2016-07-10 15:22 ` Francisco Olarte <folarte@peoplecall.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox