Re: Determine the name of the calling function

From: Daniel Staal <DStaal(at)usa(dot)net>
To: Jack Kaufman <jack(dot)kaufman(at)sanmina(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Determine the name of the calling function
Date: 2013-01-18 17:12:05
Message-ID: AFCF5A343D6FAC616C17389E@[192.168.1.50]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

--As of January 18, 2013 11:28:02 AM -0500, Jack Kaufman is alleged to have
said:

> Our shop is converting to PostgreSQL & PL/pgSQL and we are figuring out
> how to apply the language to our environment.  I want to write some API
> functions that will be called from many other functions.  I want these
> APIs to log errors to a table and I would like the table entries to
> include the name of the function that called the API.  Anyway, that's
> where I'm headed.  Thanks for the support.

--As for the rest, it is mine.

Just a question, as I'm not entirely sure of the answer myself, but would
it be possible in another one of the languages Postgres supports? This
sounds like a language feature to me, and I know Perl's 'caller' function
would do this for instance, the question is if it would be fully functional
in pgPerl.

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author. Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes. This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2013-01-18 17:32:55 Re: Determine the name of the calling function
Previous Message Casey Allen Shobe 2013-01-18 16:54:10 Re: Determine the name of the calling function