Re: [HACKERS] Odd behavior with PG_TRY - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: [HACKERS] Odd behavior with PG_TRY
Date
Msg-id CAA4eK1KN62mjSusUR-Y2QMERF78dqPQ0zVyp40un=nbRM8hkZw@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Odd behavior with PG_TRY  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
List pgsql-hackers
On Mon, Jan 2, 2017 at 10:43 PM, Jim Nasby <Jim.Nasby@bluetreble.com> wrote:
> On 1/2/17 1:31 AM, Amit Kapila wrote:
>>
>> On Mon, Jan 2, 2017 at 11:14 AM, Jim Nasby <Jim.Nasby@bluetreble.com>
>> wrote:
>>
>> Looks strange, what is the value of 'i'?  Did you get the same result
>> if you try to print args->in.r.atts[0] inside PG_TRY?
>
>
> i is 0, makes no difference:
>
> (lldb) call i
> (int) $56 = 0
> (lldb) call args->in.r.atts[0]
> error: Couldn't apply expression side effects : Couldn't dematerialize a
> result variable: couldn't read its memory
> (lldb)
>

To localize the problem you might want to try by just having the
problematic statement in PG_TRY();

PG_TRY();
{
if (args->in.r.atts[0].func == NULL)
{
}
}
PG_CATCH();
{
PG_RE_THROW();
}
PG_END_TRY();



-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Kohei KaiGai
Date:
Subject: Re: [HACKERS] PassDownLimitBound for ForeignScan/CustomScan [take-2]
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Odd behavior with PG_TRY