[RFC] obtaining the function call stack

From: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: [RFC] obtaining the function call stack
Date: 2009-07-13 18:57:38
Message-ID: 20090713185738.GH4930@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

This is a preliminary request for comments on obtaining a function call
stack. I've been trying to dodge the issue by exporting elog.c internal
state (errcontext), but that turns out to be unfeasible and it's such a
horrid kludge anyway.

So, the idea is to have a stack maintained by the function manager; each
called function enters an element in it containing the interesting
information about the function. We'd have another function that would
return this stack as a result set. (With this arrangement, the topmost
element would always appear to be this "peek" function.)

I haven't looked at the code to see how this would actually be
implemented, so I don't have more details to offer. Does anybody have
opinions on the matter?

--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-07-13 19:02:17 Re: [RFC] obtaining the function call stack
Previous Message Robert Haas 2009-07-13 18:33:41 Re: Predicate migration on complex self joins