Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vo5xr-0002ee-7z for pgsql-jdbc@arkaria.postgresql.org; Wed, 04 Dec 2013 06:29:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vo5xp-0001GJ-Us for pgsql-jdbc@arkaria.postgresql.org; Wed, 04 Dec 2013 06:29:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vo4KK-0004VN-Qh for pgsql-jdbc@postgresql.org; Wed, 04 Dec 2013 04:44:44 +0000 Received: from sam.nabble.com ([216.139.236.26]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vo4KI-0005V8-7S for pgsql-jdbc@postgresql.org; Wed, 04 Dec 2013 04:44:44 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1Vo4KH-0004Bb-0E for pgsql-jdbc@postgresql.org; Tue, 03 Dec 2013 20:44:41 -0800 Date: Tue, 3 Dec 2013 20:44:41 -0800 (PST) From: plalg To: pgsql-jdbc@postgresql.org Message-ID: <1386132281001-5781563.post@n5.nabble.com> In-Reply-To: <1386115862077-5781549.post@n5.nabble.com> References: <1386115862077-5781549.post@n5.nabble.com> Subject: Re: The PostgreSQl 9.3 JDBC driver fails to find foreign tables MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.1 (/) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org 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. -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc