From: | Pepe TD Vo <pepevo(at)yahoo(dot)com> |
---|---|
To: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Pgsql-admin <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: execute a procedure from another procudure? |
Date: | 2018-11-08 20:13:55 |
Message-ID: | 298826954.1145763.1541708035923@mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
I worked around with the transaction and it gives me no error and I assumed it works.
create or replace FUNCTION "CIDR_STAGING"."PR_WRITE_ERROR_LOG" ( v_os_user IN varchar(4000), v_host IN varchar(4000), v_module IN varchar(4000), v_errorcode IN int, v_errormsg IN varchar(4000) ) RETURNS VOID as $$
BEGIN START TRANSACTION; insert into cidrmgmt.errorlog( tstamp, os_user,host,module,errorcode,errormsg) values (current_timestamp, v_os_user, v_host, v_module, v_ErrorCode, v_ErrorMsg );
/* commit; */ end;$$ LANGUAGE plpgsql;
CREATE FUNCTION
Query returned successfully in 107 msec.
thank you all.
Bach-Nga
No one in this world is pure and perfect. If you avoid people for their mistakes you will be alone. So judge less, love and forgive more.To call him a dog hardly seems to do him justice though in as much as he had four legs, a tail, and barked, I admit he was, to all outward appearances. But to those who knew him well, he was a perfect gentleman (Hermione Gingold)
**Live simply **Love generously **Care deeply **Speak kindly.*** Genuinely rich *** Faithful talent *** Sharing success
On Thursday, November 8, 2018 4:00 AM, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
On 07/11/2018 15:12, Pepe TD Vo wrote:
> and I converted it to Postgres Pragma autonomous_transaction and I'm not
> sure its corrected but it didn't give any error.
PostgreSQL does not support autonomous transactions. Some people use
dblink as a workaround.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Pepe TD Vo | 2018-11-09 02:54:51 | %rowtype |
Previous Message | Guillaume Lelarge | 2018-11-08 09:16:06 | Re: query can't merge into table of the other schema |