Re: errcontext support in PL/Perl

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alexey Klyukin <alexk(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org, Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Subject: Re: errcontext support in PL/Perl
Date: 2009-09-15 16:47:26
Message-ID: 1253033246.16070.5.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On tis, 2009-09-15 at 11:32 -0400, Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2009-09-15 16:54:19 Re: WIP: generalized index constraints
Previous Message Brendan Jurd 2009-09-15 16:44:23 Re: WIP: generalized index constraints