Book a Demo

Author Topic: 15.1.1526 fails to import PG 12.0 tables  (Read 6737 times)

Prostomax

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
15.1.1526 fails to import PG 12.0 tables
« on: January 28, 2020, 09:17:20 pm »
When using 'Import DB schema from ODBC...' and connecting to PostgreSQL 12.0, EA can read list of DB schemas fine, but when starting import of actual tables EA fails with message "Error retrieving table list!". PG logs says the following:

Code: [Select]
2020-01-28 11:58:41.925 EET [15312] ERROR:  column reference "oid" is ambiguous at character 861
2020-01-28 11:58:41.925 EET [15312] STATEMENT:  SELECT
    n.nspname                                       AS ObjectSchema,    --1
    c.relname                                       AS ObjectName,      --2
    CASE
WHEN c.relkind = 'r' THEN 'TABLE'
        WHEN c.relkind = 'v' THEN 'VIEW'
        WHEN c.relkind = 'S' THEN 'SEQUENCE'
    END                                             AS ObjectType,     --3
    COALESCE(OBJ_DESCRIPTION(c.oid),'')             AS Remarks,     --4
    COALESCE('TABLESPACE=' || t.spcname || ';','')  AS Properties     --5
FROM
    (SELECT *, oid
    FROM pg_class
    WHERE relkind IN ('r')
    ) c   
INNER JOIN 
    (SELECT *, oid
    FROM    pg_namespace
    WHERE nspname IN ('myschema') AND nspname NOT IN ('pg_toast','pg_catalog','information_schema') --WHERE   nspname NOT IN ('information_schema','pg_catalog','pg_toast')
    ) n
    ON  c.relnamespace = n.oid
LEFT JOIN   
    pg_tablespace t
ON 
    c.reltablespace = t.oid
Order By n.nspname, c.relkind, c.relname

ODBC driver version is psqlodbc_12_00_0000.

Please note that import of PG 10 tables in the same EA version on the same PC works with no issues.


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: 15.1.1526 fails to import PG 12.0 tables
« Reply #1 on: January 28, 2020, 10:17:51 pm »
You should send a bug report (link below in the Support section). Good luck with that.

q.