Re: CALL stmt, ERROR: unrecognized node type: 113 bug

Michael Paquier <michael.paquier@gmail.com>

From: Michael Paquier <michael.paquier@gmail.com>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2018-02-02T07:07:28Z
Lists: pgsql-hackers
On Fri, Feb 02, 2018 at 04:01:13PM +0900, Michael Paquier wrote:
> Peter, Andrew, this is missing some bits related to the conversion of
> SubLink nodes to SubPlan nodes for procedures when used as argument of
> a procedure as only the latter can be executed after the former is
> processed by the latter (see SS_process_sublinks).

Meh-to-self.

You need to read that as "only a SubPlan can be executed after a SubLink
has been processed by the planner", so please replace the last "latter"
by "planner".
--
Michael

Commits

  1. Avoid premature free of pass-by-reference CALL arguments.

  2. Fix oversight in CALL argument handling, and do some minor cleanup.