Re: Determine the name of the calling function - Mailing list pgsql-novice

From Tom Lane
Subject Re: Determine the name of the calling function
Date
Msg-id 6727.1358548699@sss.pgh.pa.us
Whole thread Raw
In response to Re: Determine the name of the calling function  (Jack Kaufman <jack.kaufman@sanmina.com>)
Responses Re: Determine the name of the calling function  (Jack Kaufman <jack.kaufman@sanmina.com>)
List pgsql-novice
Jack Kaufman <jack.kaufman@sanmina.com> writes:
> The output from PG_EXCEPTION_CONTEXT looks parseable, with line 1
> containing the current function, and line 2, the calling function.  The
> lines are variable length but the LF or CR should be identifiable.  Add in
> the fact of the variable number of lines you got from
> PG_EXCEPTION_CONTEXT--where line 1 become 2, and line 2 becomes 3--and the
> project is a pain but doable.

Cool.  FYI, I intend to see about fixing the bug --- IMO there should
not be a dependency on the number of executions here, and probably the
form with the extra context line is preferable.

Another thing that you should be aware of before plunging into this is
that GET STACKED DIAGNOSTICS is new as of 9.2; if you're hoping that
this code might be back-portable onto older PG versions, you'd better
not depend on it.

            regards, tom lane


pgsql-novice by date:

Previous
From: Casey Allen Shobe
Date:
Subject: Re: Determine the name of the calling function
Next
From: Keith Ouellette
Date:
Subject: WAL replication question