From: | Tony Shelver <tshelver(at)gmail(dot)com> |
---|---|
To: | Patrick(dot)Fiche(at)aqsacom(dot)com |
Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Function for Exception Logging |
Date: | 2018-10-31 06:45:15 |
Message-ID: | CAG0dhZA3j2sAqm9+9oE_biFojpQ3Y9AR=aGGrBjLCED5csJEGQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I'd be interested if there is an answer to this. The big issue with
writing to a table is the interaction with rollbacks and commits.
Even more difficult in PG functions as they have no commit / rollback
capability. I haven't played with stored procedures in in PG11 yet.
In Oracle, I wrote logging / error messages to a logging file on the fire
system, directly from PL/SQL.
This file can then be monitored for error messages via a messaging
solutions.
Regards
On Mon, 29 Oct 2018 at 19:13, Patrick FICHE <Patrick(dot)Fiche(at)aqsacom(dot)com>
wrote:
> Hi community,
>
>
>
> I would like to implement a function that would log managed Exceptions
> into a dedicated table.
>
> For example, I have some code like :
>
> BEGIN
>
> Code generation exception
>
> EXCEPTION
>
> WHEN OTHERS THEN Log_Error();
>
> END;
>
>
>
> The Log_Error function would be able to get the exception context /
> parameters to log the exception parameters into a table.
>
> Is there any way to manage this without providing the Exception parameters
> as parameters to the Log_Error function ?
>
>
>
> Thanks,
>
> Patrick
>
>
>
>
>
> *Patrick Fiche*
>
> Database Engineer, Aqsacom Sas.
>
> *c.* 33 6 82 80 69 96
>
> *e.* patrick(dot)fiche(at)aqsacom(dot)com
>
>
>
> [image: 01-03_AQSA_Main_Corporate_Logo_JPEG_White_Low.jpg]
> <http://www.aqsacom.com/>
>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Laurenz Albe | 2018-10-31 06:56:28 | Re: Full-text Search - Thesaurus relationships |
Previous Message | Torsten Förtsch | 2018-10-31 05:38:13 | Is there a way to speed up WAL replay? |