1

I tried to SELECT some systems columns, tableoid and ctid. The behavior is inconsistent. I can achieve the result from SELECT command:

SELECT tableoid::regclass, * FROM ft1 t1 LIMIT 1;
 tableoid | c1 | c2 |  c3   |            c4            |            c5            | c6 | c7 | c8  
----------+----+----+-------+--------------------------+--------------------------+----+----+-----
 ft1      |  1 |  1 | 00001 | Fri Jan 02 00:00:00 1970 | Fri Jan 02 00:00:00 1970 | 1  | 1  | foo
(1 row)

but not by SELECT with WHERE condition:

EXPLAIN (VERBOSE, COSTS OFF)
SELECT * FROM ft1 t1 WHERE t1.tableoid = 'pg_class'::regclass LIMIT 1;
                             QUERY PLAN                             
--------------------------------------------------------------------
 Limit
   Output: c1, c2, c3, c4, c5, c6, c7, c8
   ->  Foreign Scan on public.ft1 t1
         Output: c1, c2, c3, c4, c5, c6, c7, c8
         Remote SQL: SELECT  *  FROM "T1" WHERE ((tableoid = 1259))
(5 rows)

SELECT * FROM ft1 t1 WHERE t1.tableoid = 'ft1'::regclass LIMIT 1;
ERROR:  GridDB-API is failed by 150012 at griddb_fdw.c: 2276
  No such column tableoid

GridDB FDW tries to push-down system column on the WHERE condition. How can I fix the issue?

Nooruddin Lakhani
  • 7,507
  • 2
  • 19
  • 39

0 Answers0