Re: execute a procedure from another procudure?

Поиск
Список
Период
Сортировка
От Pepe TD Vo
Тема Re: execute a procedure from another procudure?
Дата
Msg-id 298826954.1145763.1541708035923@mail.yahoo.com
обсуждение исходный текст
Ответ на Re: execute a procedure from another procudure?  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список 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.eisentraut@2ndquadrant.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




В списке pgsql-admin по дате отправления:

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: query can't merge into table of the other schema
Следующее
От: Pepe TD Vo
Дата:
Сообщение: %rowtype