pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedThe PostgreSQl 9.3 JDBC driver fails to find foreign tables
3+ messages / 2 participants
[nested] [flat]
* The PostgreSQl 9.3 JDBC driver fails to find foreign tables
@ 2013-12-04 00:11 plalg <plalg@hotmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: plalg @ 2013-12-04 00:11 UTC (permalink / raw)
To: pgsql-jdbc
The metadata class for 9.3 JDBC driver is unable to find foreign tables, the
9.2 is working good.
I am using metadata.getTables(catalog, schemaPattern, tableNamePattern,
tableTypes), and the table type does have "FOREIGN TABLE" in the list.
Is anyone else seeing this?
--
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: The PostgreSQl 9.3 JDBC driver fails to find foreign tables
@ 2013-12-04 04:44 plalg <plalg@hotmail.com>
parent: plalg <plalg@hotmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: plalg @ 2013-12-04 04:44 UTC (permalink / raw)
To: 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-...
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
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: The PostgreSQl 9.3 JDBC driver fails to find foreign tables
@ 2013-12-04 14:48 Dave Cramer <pg@fastcrypt.com>
parent: plalg <plalg@hotmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Dave Cramer @ 2013-12-04 14:48 UTC (permalink / raw)
To: plalg <plalg@hotmail.com>; +Cc: pgsql-jdbc
Thanks for finding this, and providing the fix!
Dave Cramer
dave.cramer(at)credativ(dot)ca
http://www.credativ.ca
On Tue, Dec 3, 2013 at 11:44 PM, plalg <plalg@hotmail.com> wrote:
> 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
>
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2013-12-04 14:48 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-12-04 00:11 The PostgreSQl 9.3 JDBC driver fails to find foreign tables plalg <plalg@hotmail.com>
2013-12-04 04:44 ` plalg <plalg@hotmail.com>
2013-12-04 14:48 ` Dave Cramer <pg@fastcrypt.com>
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