Pavel Stehule escribió: > 2009/7/13 Alvaro Herrera <alvhe...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers