CALL stmt, ERROR: unrecognized node type: 113 bug

Pavel Stehule <pavel.stehule@gmail.com>

From: Pavel Stehule <pavel.stehule@gmail.com>
To: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2018-02-01T16:33:54Z
Lists: pgsql-hackers
Hi

I am playing with procedures little bit

I found few bugs

create procedure test(a int)
as $$
begin
  raise notice '>>>%<<<', a;
end;
$$ language plpgsql;

call test(10); -- ok

postgres=# call test((select 10));
ERROR:  unrecognized node type: 113

postgres=# \sf test
ERROR:  cache lookup failed for type 0

Regards

Pavel

Commits

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

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