vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I need to execute COMMIT in a function pgsql, there is a way? Can I have any example? Thanks in advance. Luke. -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql |
| |||
| On Mon, Apr 7, 2008 at 6:00 PM, luke.78@libero.it <luke.78@libero.it> wrote: > Hi, > I need to execute COMMIT in a function pgsql, > there is a way? > No. Transaction control statements like COMMIT/ROLLBACK/SAVEPOINT are not supported inside plpgsql functions. If you can tell us what you are trying to do, somebody may help you with that. Thanks, Pavan -- Pavan Deolasee EnterpriseDB http://www.enterprisedb.com -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql |
| |||
| luke.78@libero.it wrote: > Hi, > I need to execute COMMIT in a function pgsql, > there is a way? > A function runs in a transaction. It cannot, as far as I know, commit one. Why do you need to do that, anyway? What're you trying to achieve? -- Craig Ringer -- Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-sql |
| ||||
| hi, please see the below case. i have executed that function and it updated the table without any errors and returned the value also. create or replace function meena_test return varchar2 as l_ename varchar2(10); begin update emp set ename = 'cherum' where empno = 101; commit; select ename into l_ename from emp where ename = 'Meena'; return(l_ename); end; / sho err |