Re: [HACKERS] PG_TRY & PG_CATCH in FDW development

2017-04-25 Thread Abbas Butt
Thanks for the reply. On Tue, Apr 25, 2017 at 7:45 PM, Tom Lane wrote: > Abbas Butt writes: > > What is happening for me is that PG_RE_THROW takes me to PG_TRY in the > same > > function and then PG_TRY jumps to PG_CATCH where PG_RE_THROW again jumps > to > > PG_TRY in the same function resulti

Re: [HACKERS] PG_TRY & PG_CATCH in FDW development

2017-04-25 Thread Tom Lane
Abbas Butt writes: > What is happening for me is that PG_RE_THROW takes me to PG_TRY in the same > function and then PG_TRY jumps to PG_CATCH where PG_RE_THROW again jumps to > PG_TRY in the same function resulting in an infinite loop. The query > therefore never returns. It is supposed to throw t

[HACKERS] PG_TRY & PG_CATCH in FDW development

2017-04-25 Thread Abbas Butt
Hi Hackers, I want to share a technical problem that I am facing while writing code for an FDW. The problem is as follows: In the FDW call back functions it is recommended to use PG_TRY PG_CATCH blocks along with PG_RE_THROW to disconnect from the foreign server. I am using the same technique in I