Thread: BUG #8657: Postgres 9.3 JDBC driver is unable to find the Foreign tables
BUG #8657: Postgres 9.3 JDBC driver is unable to find the Foreign tables
From
plalg@hotmail.com
Date:
The following bug has been logged on the website: Bug reference: 8657 Logged by: Prakash Lal Email address: plalg@hotmail.com PostgreSQL version: 9.3.0 Operating system: Windows 7 Description: Postgres 9.3 JDBC driver is unable to find the Foreign tables. Found the cause, the hashmap values for "FOREIGN TABLE" in AbstractJdbc2DatabaseMetaData class is getting overwritten by "MATERIALIZED VIEW" values: Before ht = new HashMap(); tableTypeClauses.put("FOREIGN TABLE", ht); ht.put("SCHEMAS", "c.relkind = 'f'"); ht.put("NOSCHEMAS", "c.relkind = 'f'"); tableTypeClauses.put("MATERIALIZED VIEW", ht); ht.put("SCHEMAS", "c.relkind = 'm'"); ht.put("NOSCHEMAS", "c.relkind = 'm'"); After (fix): ht = new HashMap(); tableTypeClauses.put("FOREIGN TABLE", ht); ht.put("SCHEMAS", "c.relkind = 'f'"); ht.put("NOSCHEMAS", "c.relkind = 'f'"); ht = new HashMap(); // this is the line missing tableTypeClauses.put("MATERIALIZED VIEW", ht); ht.put("SCHEMAS", "c.relkind = 'm'"); ht.put("NOSCHEMAS", "c.relkind = 'm'"); thanks Prakash