CREATE SERVER fdw_explain FOREIGN DATA WRAPPER brainfuck_fdw; -- Prints "A" and "B" on their own lines. CREATE FOREIGN TABLE ab (line text) SERVER fdw_explain OPTIONS (program '++++++++[>++++++++<-]>+.<++++++++++.>+.<.'); SELECT set_config(name, 'on', false) FROM pg_settings WHERE name IN ('debug_parallel_query', 'force_parallel_mode'); set_config ------------ on (1 row) EXPLAIN (COSTS OFF) SELECT * FROM ab; QUERY PLAN -------------------------- Gather Workers Planned: 1 Single Copy: true -> Foreign Scan on ab (4 rows) -- The machine can't filter, so WHERE clauses stay in the plan. EXPLAIN (COSTS OFF) SELECT * FROM ab WHERE line <> 'A'; QUERY PLAN ------------------------------------- Gather Workers Planned: 1 Single Copy: true -> Foreign Scan on ab Filter: (line <> 'A'::text) (5 rows) -- A table has a single `line text` column. CREATE FOREIGN TABLE int_line (line int) SERVER fdw_explain OPTIONS (program '+'); EXPLAIN (COSTS OFF) SELECT * FROM int_line; ERROR: column "line" of foreign table "int_line" must be of type text DROP SERVER fdw_explain CASCADE; NOTICE: drop cascades to 2 other objects DETAIL: drop cascades to foreign table ab drop cascades to foreign table int_line