Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 8CA7F189E83A; Tue, 10 Apr 2012 11:48:13 -0300 (ADT) Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHcMc-0004jD-Pf; Tue, 10 Apr 2012 14:48:12 +0000 X-Originating-IP: 217.70.178.137 Received: from mfilter8-d.gandi.net (mfilter8-d.gandi.net [217.70.178.137]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id 88A5E1720B1; Tue, 10 Apr 2012 16:47:47 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter8-d.gandi.net Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by mfilter8-d.gandi.net (mfilter8-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id QH+sJ0kvl9ha; Tue, 10 Apr 2012 16:47:46 +0200 (CEST) X-Originating-IP: 98.27.54.176 Received: from [192.168.10.146] (cpe-098-027-054-176.nc.res.rr.com [98.27.54.176]) (Authenticated sender: adsend@dunslane.net) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 3E5941720AC; Tue, 10 Apr 2012 16:47:44 +0200 (CEST) Message-ID: <4F84480F.1020905@dunslane.net> Date: Tue, 10 Apr 2012 10:47:43 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.1) Gecko/20120216 Thunderbird/10.0.1 MIME-Version: 1.0 To: Merlin Moncure CC: Atri Sharma , Dave Cramer , Pg Hackers , pgsql-jdbc@postgresql.org Subject: Re: [JDBC] Regarding GSoc Application References: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> <4F831234.7040209@dunslane.net> <4F8438AD.7060503@dunslane.net> <4F844089.2050308@dunslane.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201204/464 X-Sequence-Number: 206267 On 04/10/2012 10:34 AM, Merlin Moncure wrote: > On Tue, Apr 10, 2012 at 9:15 AM, Andrew Dunstan wrote: >> >> On 04/10/2012 09:48 AM, Merlin Moncure wrote: >>> On Tue, Apr 10, 2012 at 8:42 AM, Andrew Dunstan >>> wrote: >>>>> I am considering two paths for doing this: >>>>> The first one takes the help of the SPI(Server Programming Interface) >>>>> and the second one directly connects through Pl/Java and JNI(Java >>>>> Native Interface). >>>>> >>>> I'd say forget SPI - I don't think it's going to help you here. Just >>>> concentrate on getting the functionality via a PL/Java wrapper. I >>>> wouldn't >>>> worry too much about jdbc style URLs either, since logically I think >>>> you'd >>>> want to specify the connection parameters via server and FDW options as >>>> in >>>> my example above - that way it would be consistent with other FDWs. But >>>> that's a piece of bikeshedding for now. Basically, you want to implement >>>> the >>>> handler function to start with. >>> how do you cross from FDW into a pl/java routine without SPI? >>> >> >> Add the FDW handler as a sibling function of the function call handler. At >> least that would be my first approach to writing a DBI::DBD FDW wrapper for >> plperl, which I naturally know rather better than the PL/Java code. > right -- well looking at plperl.c, I take it you are meaning to invoke > (or write a similar function to) the plperl_call_handler, right? hm > -- if you could do that then yes, that would work for pl/java as well > and it would bypass the SPI interface. this is avoiding the public > APIs, so it's going to take some time to figure out how to set up the > call and walk the result since I don't know how to do that off the top > of my head. > I don't understand what the heck you're talking about, TBH. From a user perspective there is nothing to work out. It will look like any other FDW. The implementor of the FDW handler will have to work out the glue between postgres and the JVM, but that's not going to be you, right? cheers andrew