Skip site navigation (1) Skip section navigation (2)

Re: Error handling in plperl and pltcl

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Richard Huxton <dev(at)archonet(dot)com>,Jan Wieck <JanWieck(at)Yahoo(dot)com>,Thomas Hallgren <thhal(at)mailblocks(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Error handling in plperl and pltcl
Date: 2004-11-30 16:45:56
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

Tom Lane wrote:

>In the case of Perl I suspect it is reasonably possible to determine
>whether there is an "eval" surrounding the call or not, although we
>might have to get more friendly with Perl's internal data structures
>than a purist would like.  

Not really very hard. (caller(0))[3] should have the value "(eval)" if 
you are in an eval. There might also be some ways of getting this via 
the perlguts API although I'm not aware of it. Of course, if you're in a 
subroutine which is in turn called from an eval things get trickier, so 
we might have to walk the stack frames a bit.



In response to

pgsql-hackers by date

Next:From: Mark WongDate: 2004-11-30 16:55:01
Subject: Re: 8.0beta5 results w/ dbt2
Previous:From: Mark WongDate: 2004-11-30 16:44:41
Subject: Re: 8.0beta5 results w/ dbt2

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group