Re: The PostgreSQl 9.3 JDBC driver fails to find foreign tables - Mailing list pgsql-jdbc

From plalg
Subject Re: The PostgreSQl 9.3 JDBC driver fails to find foreign tables
Date
Msg-id 1386132281001-5781563.post@n5.nabble.com
Whole thread Raw
In response to The PostgreSQl 9.3 JDBC driver fails to find foreign tables  (plalg <plalg@hotmail.com>)
Responses Re: The PostgreSQl 9.3 JDBC driver fails to find foreign tables  (Dave Cramer <pg@fastcrypt.com>)
List pgsql-jdbc
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'");




--
View this message in context:
http://postgresql.1045698.n5.nabble.com/The-PostgreSQl-9-3-JDBC-driver-fails-to-find-foreign-tables-tp5781549p5781563.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.


pgsql-jdbc by date:

Previous
From: plalg
Date:
Subject: The PostgreSQl 9.3 JDBC driver fails to find foreign tables
Next
From: Dave Cramer
Date:
Subject: Re: The PostgreSQl 9.3 JDBC driver fails to find foreign tables