Re: mysql_fdw + PG10: unrecognized node type: 217

From: Christoph Berg <myon(at)debian(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: mysql_fdw + PG10: unrecognized node type: 217
Date: 2017-09-11 08:53:39
Message-ID: 20170911085339.4wl3dj3ih55xtrue@msg.df7cb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Re: To Tom Lane 2017-09-11 <20170911083136(dot)stdnc4w52wk3o4se(at)msg(dot)df7cb(dot)de>
> postgres=# select test_param_where();
> FEHLER: XX000: unrecognized node type: 217
> KONTEXT: SQL-Anweisung »select b from numbers where a=x«
> PL/pgSQL-Funktion test_param_where() Zeile 6 bei SQL-Anweisung
> ORT: ExecInitExprRec, execExpr.c:2031

The problem happens on the 6th iteration of this loop:

CREATE FOREIGN TABLE numbers(a int, b varchar(255)) SERVER mysql_svr OPTIONS (dbname 'testdb', table_name 'numbers');

create or replace function test_param_where() returns void as $$
DECLARE
n varchar;
BEGIN
FOR x IN 1..9 LOOP
select b into n from numbers where a=x;
raise notice 'Found number %', n;
end loop;
return;
END
$$ LANGUAGE plpgsql;

SELECT test_param_where();

***************
*** 345,368 ****
NOTICE: Found number Three
NOTICE: Found number Four
NOTICE: Found number Five
! NOTICE: Found number Six
! NOTICE: Found number Seven
! NOTICE: Found number Eight
! NOTICE: Found number Nine
! test_param_where
! ------------------
!
! (1 row)
!
DELETE FROM employee;
...
--- 344,365 ----
NOTICE: Found number Three
NOTICE: Found number Four
NOTICE: Found number Five
! ERROR: unrecognized node type: 217
! CONTEXT: SQL statement "select b from numbers where a=x"
! PL/pgSQL function test_param_where() line 6 at SQL statement
! /*
DELETE FROM employee;
...

Christoph

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2017-09-11 09:03:06 Re: mysql_fdw + PG10: unrecognized node type: 217
Previous Message Fabien COELHO 2017-09-11 08:49:42 Re: pgbench - minor fix for meta command only scripts