Search Postgresql Archives

Oracle_FDW - Cache lookup failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a problem wiht Oracle FDW 0.9.10 in PostgreSQL 9.3
I am using pg 9.3.4
Oracle FDW 0.9.10
Fedora 20
Client Oracle Release 11.2.0.3.0

Return Error:

ERROR:  cache lookup failed for type 0

I am executing the simple query in most foreign tables..

Example wher tables with f_ are foreign tables:


SELECT 0 AS u_pkey,
       f_vendedor.u_orgvenda    AS u_orgvenda,
       f_vendedor.s_codvendedor AS s_codvendedor,
       grupos.s_codgrupo        AS s_codgrupo,
       f_produto.s_codproduto
  FROM f_vendedor
  JOIN (SELECT 'D'            AS s_tipogrupo,
               codepto::text  AS s_codgrupo,
               codusur::text  AS s_codvendedor
         FROM erp.pcusurdepsec
        UNION
        SELECT DISTINCT
               'D'            AS s_tipogrupo,
               codepto::text  AS s_codgrupo,
               codusur::text  AS s_codvendedor
         FROM f_vendedor CROSS JOIN (SELECT DISTINCT codepto FROM f_produto) f_produto
        UNION ALL
        SELECT DISTINCT
               'S'            AS s_tipogrupo,
               codsec::text   AS s_codgrupo,
               codusur::text  AS s_codvendedor
         FROM erp.pcusurdepsec
        UNION
        SELECT DISTINCT
               'S'            AS s_tipogrupo,
               codsec::text   AS s_codgrupo,
               codusur::text  AS s_codvendedor
         FROM f_vendedor CROSS JOIN (SELECT DISTINCT codsec FROM f_produto) f_produto
        UNION ALL
        SELECT 'F'             AS s_tipogrupo,
               codfornec::text AS s_codgrupo,
               codusur::text   AS s_codvendedor
         FROM erp.pcusurfornec
        UNION
        SELECT DISTINCT
               'F'              AS s_tipogrupo,
               codfornec::text  AS s_codgrupo,
               codusur::text    AS s_codvendedor
         FROM f_vendedor CROSS JOIN (SELECT DISTINCT codfornec FROM f_produto) f_produto
        UNION ALL
        SELECT DISTINCT
               'I'::text                AS s_tipogrupo,
               pcdistrib.coddistrib     AS s_codgrupo,
               f_vendedor.s_codvendedor AS s_codvendedor
          FROM erp.pcdistrib
         CROSS JOIN f_vendedor
        ) grupos ON (f_vendedor.s_codvendedor = grupos.s_codvendedor)
  INNER JOIN t_vendedor ON (t_vendedor.s_codigo = f_vendedor.s_codvendedor AND t_vendedor.u_bloqueado = 0)
  INNER JOIN f_produto ON ( grupos.s_codgrupo = (CASE WHEN (SELECT s_valor FROM t_parametro_cliente WHERE s_campo = 'v_utiliza_grupo') = 'D' THEN f_produto.codepto::text
                                                      WHEN (SELECT s_valor FROM t_parametro_cliente WHERE s_campo = 'v_utiliza_grupo') = 'F' THEN f_produto.codfornec::text
                                                      WHEN (SELECT s_valor FROM t_parametro_cliente WHERE s_campo = 'v_utiliza_grupo') = 'S' THEN f_produto.codsec::text
                                                      WHEN (SELECT s_valor FROM t_parametro_cliente WHERE s_campo = 'v_utiliza_grupo') = 'I' THEN f_produto.coddistrib::text 
                                                 END) )
  WHERE grupos.s_tipogrupo = (SELECT s_valor
                         FROM t_parametro_cliente
                        WHERE s_campo = 'v_utiliza_grupo')
      ;






--
Atenciosamente,

Emanuel Araújo

Linux Certified, DBA PostgreSQL


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux