Re: Is there a way to get the name of the calling function in pgplsql?

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Thiemo Kellner <thiemo(at)gelassene-pferde(dot)biz>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Is there a way to get the name of the calling function in pgplsql?
Date: 2018-03-21 07:15:03
Message-ID: CAFj8pRDb-ZqUDQHYqy3U8Q4d_3btUm_bXjjKjHY4iRLzBmECRw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi

2018-03-21 8:24 GMT+01:00 Thiemo Kellner <thiemo(at)gelassene-pferde(dot)biz>:

> Hi all
>
> In a function I would like to log the caller. Is there a way to get its
> name in pgplsql?
>

you can read it from stack

https://www.postgresql.org/docs/current/static/plpgsql-control-structures.html#PLPGSQL-CALL-STACK

Regards

Pavel

> Kind regards
>
> Thiemo
>
> --
> Öffentlicher PGP-Schlüssel: http://pgp.mit.edu/pks/lookup?
> op=get&search=0x8F70EFD2D972CBEF
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thiemo Kellner 2018-03-21 07:24:27 Is there a way to get the name of the calling function in pgplsql?
Previous Message Stuart McGraw 2018-03-21 05:52:53 Re: postgresql-10.3 on unbuntu-17.10 - how??