Re: errcontext support in PL/Perl - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: errcontext support in PL/Perl
Date
Msg-id 1253033246.16070.5.camel@vanquo.pezone.net
Whole thread Raw
In response to Re: errcontext support in PL/Perl  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: errcontext support in PL/Perl
List pgsql-hackers
On tis, 2009-09-15 at 11:32 -0400, Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
> > But for extra credit, couldn't we code it so that the context is set
> > before the PL handler is called, so that we get this functionality into
> > all PLs at once?
> 
> FWIW, I don't particularly agree with that --- there is no reason to
> suppose that all PLs will want to do this exactly the same way.

I'd imagine that we simply set the context to "$language function
$name", probably in fmgr_info_other_lang().  If a language wants more
than that, it can set another level of context.  Of course this way we
would not save much code in, say, PL/Perl, but all the other PLs that
are currently not using this stuff at all would get it for free.




pgsql-hackers by date:

Previous
From: Brendan Jurd
Date:
Subject: Re: WIP: generalized index constraints
Next
From: Jeff Davis
Date:
Subject: Re: WIP: generalized index constraints