Dave Cramer <pg@fastcrypt.com> wrote:
> Andrew Dunstan <andrew@dunslane.net> wrote:
>> All you'll need on the postgres side is the relevant JDBC driver,
>> so you'd have instant access via standard select queries to
>> anything you can get a JDBC driver to talk to. That seems to me
>> something worth having.
>>
>> I imagine it would look rather like this:
>>
>> CREATE FOREIGN DATA WRAPPER foodb HANDLER pljava_jdbc_handler
>> OPTIONS (driver 'jdbc.foodb.org');
>> CREATE SERVER myfoodb FOREIGN DATA WRAPPER foodb OPTIONS(host
>> '1.2.3.4', user 'foouser', password 'foopw');
>> CREATE FOREIGN TABLE footbl (id int, data text) SERVER myfoodb;
>> SELECT * from footbl;
>>
> Well this is certainly more explanation than we have so far.
>
> Is this the intended use case ?
That is how I've understood it from the discussion I've seen -- an
FDW to connect to JDBC so that you can wrap anything accessible from
JDBC. The use of pl/Java seems to be the easiest way to get there.
-Kevin