From: plalg <plalg@hotmail.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: The PostgreSQl 9.3 JDBC driver fails to find foreign tables
Date: Tue, 3 Dec 2013 20:44:41 -0800 (PST)
Message-ID: <1386132281001-5781563.post@n5.nabble.com> (raw)
In-Reply-To: <1386115862077-5781549.post@n5.nabble.com>
References: <1386115862077-5781549.post@n5.nabble.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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-...
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: plalg@hotmail.com
Subject: Re: The PostgreSQl 9.3 JDBC driver fails to find foreign tables
In-Reply-To: <1386132281001-5781563.post@n5.nabble.com>
References: <1386115862077-5781549.post@n5.nabble.com> <1386132281001-5781563.post@n5.nabble.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox