laurenz / oracle_fdw

PostgreSQL Foreign Data Wrapper for Oracle
http://laurenz.github.io/oracle_fdw/
Other
492 stars 157 forks source link

Number not converted to boolean: invalid input syntax for type boolean: "2" #468

Closed mariszin closed 3 years ago

mariszin commented 3 years ago

Although the readme says

If a NUMBER is converted to a boolean, 0 means false, everything else true.

When the number is anything but 1, the query fails with invalid input syntax for type boolean: "2" Sample table:

CREATE FOREIGN TABLE oracle_fdw_test (
  b boolean
) server oracle_fdw_server options (table $$(
SELECT
  2
FROM
  DUAL
)$$);

select * from oracle_fdw_test;

Output from SELECT oracle_diag('oracle_fdw_server');:

oracle_fdw 2.4.0devel, PostgreSQL 12.6 (Debian 12.6-1.pgdg100+1), Oracle client 21.1.0.0.0, Oracle server 11.2.0.4.0

Output from SELECT oracle_diag();:

oracle_fdw 2.4.0devel, PostgreSQL 12.6 (Debian 12.6-1.pgdg100+1), Oracle client 21.1.0.0.0, ORACLE_HOME=/opt/oracle/instantclient_21_1
laurenz commented 3 years ago

Thanks for the report!