Open 4321ip opened 6 years ago
DROP FOREIGN TABLE IF EXISTS fdw_server.xxx; CREATE FOREIGN TABLE fdw_server.xxx (col text) SERVER server OPTIONS (query ' select 111 as col '); select * from fdw_server.xxx where col = 'qwerty';
result:
col 111
this is a bug?
Clearly this is a bug, I've seen it on a few occasions and if I remember correctly, casting to TEXT resolves it. Try:
select * from fdw_server.xxx where col::TEXT = 'qwerty';
DROP FOREIGN TABLE IF EXISTS fdw_server.xxx; CREATE FOREIGN TABLE fdw_server.xxx (col text) SERVER server OPTIONS (query ' select 111 as col '); select * from fdw_server.xxx where col = 'qwerty';
result:
col 111
this is a bug?