Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mBysO-0002o6-Et for pgsql-admin@arkaria.postgresql.org; Fri, 06 Aug 2021 12:23:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mBysN-00065O-3W for pgsql-admin@arkaria.postgresql.org; Fri, 06 Aug 2021 12:22:59 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <066ce286@free.fr>) id 1mBysM-00065F-PC for pgsql-admin@lists.postgresql.org; Fri, 06 Aug 2021 12:22:58 +0000 Received: from smtp6-g21.free.fr ([212.27.42.6]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <066ce286@free.fr>) id 1mBysK-00043R-6e for pgsql-admin@lists.postgresql.org; Fri, 06 Aug 2021 12:22:57 +0000 Received: from zimbra82-e14.priv.proxad.net (unknown [172.20.243.235]) by smtp6-g21.free.fr (Postfix) with ESMTP id 9CFA4780304; Fri, 6 Aug 2021 14:22:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1628252572; bh=rYveimBmzz0k3sRFtWi0QmM59V8kgjRFlE19N4CiNE0=; h=Date:From:To:In-Reply-To:Subject:From; b=nK+B++qvt6AsspW4PhFQiopnUjRsPB+VW0uZBzzF16cMFt1QUaBOPEKhHc9Q/kaw4 FCUoOVnRtZuFb7+KZNHDEY9QnHEkwsNR3lrLWfSyaqPBb3J54ccswnvJ042MAp4j6P FabobYPoiA+purGvL/Ib7KWLLrIVtAyeTVvsbhGPghXux7U7Sm/hnaMMxNx70IDIRD k02ftNEJUxBCBbWBpaZ9ycUUO7pRMzHWLz5M4hcIpCRs4mCVRfKuSJEuu+kTGv7kZH dQ1JcfprtcIxHRZVtCKS+p7vPj6P5njlb9V0RR4WiCOyvUMawLX1ekU2555yUTcZHL xYLn0sH0O5LGQ== Date: Fri, 6 Aug 2021 14:22:52 +0200 (CEST) From: 066ce286@free.fr To: Mukesh Rajpurohit , Pgsql-admin Message-ID: <1988438991.782818247.1628252572604.JavaMail.root@zimbra82-e14.priv.proxad.net> In-Reply-To: Subject: Re: Oracle error log table equivalent in postgresql MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [81.252.143.45] X-Mailer: Zimbra 7.2.0-GA2598 (ZimbraWebClient - GC92 (Win)/7.2.0-GA2598) X-Authenticated-User: 066ce286@free.fr List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > Hi all, > I am porting oracle procedures into postgresql code and some oracle > procedure contain error log table and save exception code. I could > not find any equivalent of it in postgresql. > > > Please help if any pointer or lead to its solution. Something like : <..> EXCEPTION WHEN OTHERS THEN GET STACKED DIAGNOSTICS l_errno=RETURNED_SQLSTATE, l_errtext=MESSAGE_TEXT, l_errctx=PG_EXCEPTION_CONTEXT; PERFORM TRACE_ERROR(l_errno,l_errtext,l_errctx ); RAISE EXCEPTION 'ERREUR %\n%\n%\nStackTrace : %',l_errno,l_errtext,l_errctx; END; $$ LANGUAGE PLPGSQL; ??