Re: [RFC] obtaining the function call stack - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: [RFC] obtaining the function call stack
Date
Msg-id 20090714032413.GU4930@alvh.no-ip.org
Whole thread Raw
In response to Re: [RFC] obtaining the function call stack  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
Pavel Stehule escribió:
> 2009/7/13 Alvaro Herrera <alvherre@commandprompt.com>:
> > Pavel Stehule escribió:
> >> Hello
> >>
> >> I did some similar (but Oracle like) in orafce - so it can help. I
> >> thing, so this should be very useful, but result set isn't best
> >> format. Usually you would to print to log and you have to iterate via
> >> set. So maybe better format could be some structured text.
> >
> > Thanks.  What's the file/function?
> 
> http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/orafce/orafce/utility.c?rev=1.9&content-type=text/x-cvsweb-markup

Thanks.

I played with this for a couple of hours, and the inevitable conclusion
is that this approach is doomed, if only because it depends on the user
not setting a non-english locale.  Otherwise errcontext() would store
translated messages in the error stack, and the code trying to parse
them would fail miserably.

I haven't looked at pldebugger, but if it does anything similar to this,
it's obviously prey to the same problem ... which I guess means that we
really need some more robust way of doing it, there already being three
potential users of it.

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


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Upgrading our minimum required flex version for 8.5
Next
From: Jaime Casanova
Date:
Subject: Re: Index-only scans