laurenz / oracle_fdw

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

Internal oracle_fdw error: encountered unknown node type 164. #636

Closed JuseokJang closed 10 months ago

JuseokJang commented 11 months ago

Hello,

We migrated from PPAS 9.5 to EPAS 13.12. oracle_fdw table select queries that performed well in 9.5 but do not perform in 13.12 with the following error. I'm curious what the cause of the error is and if there is a solution.

select DECODE(F_GUBUN, 'B', 'Bevel', 'C', 'Cut', 'Q', 'QA', '') as F_GUBUN from TB_SF_DIMENSION_RAW_FDW SQL Error [HV00M]: ERROR: Internal oracle_fdw error: encountered unknown node type 164.

CREATE FOREIGN TABLE rass.tb_sf_dimension_raw_fdw ( work_date varchar(14) NULL, area_code varchar(4) NULL, line_code varchar(4) NULL, f_gubun varchar(1) NULL, workorder_no varchar(13) NULL, thickness numeric NULL, width numeric NULL, height numeric NULL, distancea_b numeric NULL, distanceb_c numeric NULL, distancec_d numeric NULL, distanced_a numeric NULL, angle_a numeric NULL, angle_b numeric NULL, angel_c numeric NULL, angle_d numeric NULL, ccuta_width numeric NULL, ccuta_height numeric NULL, ccutb_width numeric NULL, ccutb_height numeric NULL, ccutc_width numeric NULL, ccutc_height numeric NULL, ccutd_width numeric NULL, ccutd_height numeric NULL, rounda_b_0 numeric NULL, rounda_b_1 numeric NULL, rounda_b_2 numeric NULL, rounda_b_3 numeric NULL, rounda_b_4 numeric NULL, rounda_b_5 numeric NULL, rounda_b_6 numeric NULL, rounda_b_7 numeric NULL, rounda_b_8 numeric NULL, rounda_b_9 numeric NULL, roundb_c_0 numeric NULL, roundb_c_1 numeric NULL, roundb_c_2 numeric NULL, roundb_c_3 numeric NULL, roundb_c_4 numeric NULL, roundb_c_5 numeric NULL, roundb_c_6 numeric NULL, roundb_c_7 numeric NULL, roundb_c_8 numeric NULL, roundb_c_9 numeric NULL, roundc_d_0 numeric NULL, roundc_d_1 numeric NULL, roundc_d_2 numeric NULL, roundc_d_3 numeric NULL, roundc_d_4 numeric NULL, roundc_d_5 numeric NULL, roundc_d_6 numeric NULL, roundc_d_7 numeric NULL, roundc_d_8 numeric NULL, roundc_d_9 numeric NULL, roundd_a_0 numeric NULL, roundd_a_1 numeric NULL, roundd_a_2 numeric NULL, roundd_a_3 numeric NULL, roundd_a_4 numeric NULL, roundd_a_5 numeric NULL, roundd_a_6 numeric NULL, roundd_a_7 numeric NULL, roundd_a_8 numeric NULL, roundd_a_9 numeric NULL, thicknessa_b_0 numeric NULL, thicknessa_b_1 numeric NULL, thicknessa_b_2 numeric NULL, thicknessa_b_3 numeric NULL, thicknessa_b_4 numeric NULL, thicknessa_b_5 numeric NULL, thicknessa_b_6 numeric NULL, thicknessa_b_7 numeric NULL, thicknessa_b_8 numeric NULL, thicknessa_b_9 numeric NULL, thicknessb_c_0 numeric NULL, thicknessb_c_1 numeric NULL, thicknessb_c_2 numeric NULL, thicknessb_c_3 numeric NULL, thicknessb_c_4 numeric NULL, thicknessb_c_5 numeric NULL, thicknessb_c_6 numeric NULL, thicknessb_c_7 numeric NULL, thicknessb_c_8 numeric NULL, thicknessb_c_9 numeric NULL, thicknessc_d_0 numeric NULL, thicknessc_d_1 numeric NULL, thicknessc_d_2 numeric NULL, thicknessc_d_3 numeric NULL, thicknessc_d_4 numeric NULL, thicknessc_d_5 numeric NULL, thicknessc_d_6 numeric NULL, thicknessc_d_7 numeric NULL, thicknessc_d_8 numeric NULL, thicknessc_d_9 numeric NULL, thicknessd_a_0 numeric NULL, thicknessd_a_1 numeric NULL, thicknessd_a_2 numeric NULL, thicknessd_a_3 numeric NULL, thicknessd_a_4 numeric NULL, thicknessd_a_5 numeric NULL, thicknessd_a_6 numeric NULL, thicknessd_a_7 numeric NULL, thicknessd_a_8 numeric NULL, thicknessd_a_9 numeric NULL, angle_a_b numeric NULL, angle_b_c numeric NULL, angel_c_d numeric NULL, angle_d_a numeric NULL, straightnessa_b_0 numeric NULL, straightnessa_b_1 numeric NULL, straightnessa_b_2 numeric NULL, straightnessa_b_3 numeric NULL, straightnessa_b_4 numeric NULL, straightnessa_b_5 numeric NULL, straightnessa_b_6 numeric NULL, straightnessa_b_7 numeric NULL, straightnessa_b_8 numeric NULL, straightnessa_b_9 numeric NULL, straightnessb_c_0 numeric NULL, straightnessb_c_1 numeric NULL, straightnessb_c_2 numeric NULL, straightnessb_c_3 numeric NULL, straightnessb_c_4 numeric NULL, straightnessb_c_5 numeric NULL, straightnessb_c_6 numeric NULL, straightnessb_c_7 numeric NULL, straightnessb_c_8 numeric NULL, straightnessb_c_9 numeric NULL, straightnessc_d_0 numeric NULL, straightnessc_d_1 numeric NULL, straightnessc_d_2 numeric NULL, straightnessc_d_3 numeric NULL, straightnessc_d_4 numeric NULL, straightnessc_d_5 numeric NULL, straightnessc_d_6 numeric NULL, straightnessc_d_7 numeric NULL, straightnessc_d_8 numeric NULL, straightnessc_d_9 numeric NULL, straightnessd_a_0 numeric NULL, straightnessd_a_1 numeric NULL, straightnessd_a_2 numeric NULL, straightnessd_a_3 numeric NULL, straightnessd_a_4 numeric NULL, straightnessd_a_5 numeric NULL, straightnessd_a_6 numeric NULL, straightnessd_a_7 numeric NULL, straightnessd_a_8 numeric NULL, straightnessd_a_9 numeric NULL, f_side varchar(1) NULL, f_accept varchar(1) NULL, glasssize_x numeric NULL, glasssize_y numeric NULL, corner_1 numeric NULL, corner_2 numeric NULL, corner_3 numeric NULL, corner_4 numeric NULL, corner_5 numeric NULL, corner_6 numeric NULL, corner_7 numeric NULL, corner_8 numeric NULL ) SERVER dl_nrpt_com_fdw OPTIONS (schema 'COM', table 'TB_SF_DIMENSION_RAW');

Thanks.

laurenz commented 11 months ago

That error could point towards a bug in oracle_fdw, but most often I have seen it reported in cases where oracle_fdw has been built against a different PostgreSQL version that what it is run with. Did you build oracle_fdw with EDB's fork of PostgreSQL? Looking at your query, I notice that you are calling a function decode() that does not exist in PostgreSQL. Perhaps EDB invented a new node type for their implementation of that function. EDB's fork is closed source, so you cannot expect any support from me (see #469). If it happens to work, good. If it doesn't, your only options are to turn to EDB or to use proper PostgreSQL instead.

JuseokJang commented 11 months ago

yes. We build oracle_fdw with EPAS 13. And as a workaround, the DECODE issue was resolved by replacing FOREIGN TABLE's SERVER with DB link. Thank you for answer.

laurenz commented 10 months ago

Thanks for the feedback.