Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id B856FF7659; Wed, 11 Apr 2012 11:38:32 -0300 (ADT) Received: from mail-pz0-f46.google.com ([209.85.210.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHygp-0000JM-UO; Wed, 11 Apr 2012 14:38:32 +0000 Received: by dadz9 with SMTP id z9so1494339dad.33 for ; Wed, 11 Apr 2012 07:38:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:references:in-reply-to:subject:date:message-id:mime-version :content-type:content-transfer-encoding:x-mailer:thread-index :content-language; bh=FDqSbC+4OHqYcTZfjTR+qfBdDMXeIdH4ATiPfY/YQ1g=; b=tqUcblJxNJocbN8vGabx+QT/+L16JgN3H4Y+rl699xCjwFboaJ1bXRAwHJgfOrHhBV QEh2TFKzyjemXAZLzmx78JZByUP9oetl93uePSZaOCoeavtujGZzdJ26L423Jl8dh2QK 5EBrkjDYiwjZrZNvL7UxaGL9pw2Ml7nkRDDFYno8PhHTf8VR7TL7MIS5mJipnYfMmbAW NRD75fD5a6cmDOAQK8o58QTAS/tHnlpXomfAAkty8y5LlGQoJmd7zDoW0bezEvROzwYz AuWTr22J8GbQIfsyLI1jXQCYPAXg0lL0urrTi9FtDw26a0fFiJI4IStxbahExK/saSnG gn1Q== Received: by 10.68.135.40 with SMTP id pp8mr38624831pbb.13.1334155099293; Wed, 11 Apr 2012 07:38:19 -0700 (PDT) Received: from GITCPC ([122.177.230.99]) by mx.google.com with ESMTPS id r10sm3052047pbf.22.2012.04.11.07.38.14 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 11 Apr 2012 07:38:18 -0700 (PDT) From: "Atri Sharma" To: "'Tom Lane'" , "'Andrew Dunstan'" , "'Pg Hackers'" , , "'Merlin Moncure'" , "'Dave Cramer'" , "'John R Pierce'" , "'Hitoshi Harada'" References: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> <4F831234.7040209@dunslane.net> <4F8438AD.7060503@dunslane.net> <4F844089.2050308@dunslane.net> <4F84480F.1020905@dunslane.net> <9511.1334071505@sss.pgh.pa.us> <9745.1334072198@sss.pgh.pa.us> < CAHyXU0z93NV5Q=UeaeSLkYN272KDsVX0Wrd=VHLMJ_-qeGEvug@mail.gmail.com> In-Reply-To: Subject: Re: [JDBC] Regarding GSoc Application Date: Wed, 11 Apr 2012 20:08:07 +0530 Message-ID: <4f85975a.2a18440a.6a58.ffffa25e@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac0XXXlqMG1JO8yKTH2UKrhOuA0UPwAjGw9g Content-Language: en-in X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201204/579 X-Sequence-Number: 206382 Hi all, In continuation to the discussion regarding my JDBC wrapping FDW,I have been talking to members of the community and I have two approaches on which I would request your suggestions and opinions: >I think we are back on the initial approach I proposed(hooking directly into the JVM and executing Java code that calls JDBC). >I think the best way to do this is create a JVM that executes the Java code and give the control of the JVM to the native API. >I agree,the only need of Pl/Java that is apparent here is the need of the Java internals(JDK et al).If we set them up >independently,then,we can have the FDW wrapping JDBC directly through JNI.JNI would call pure Java functions to connect to the >JDBC. In the above context,I think if we directly wrap JNI and call pure Java routines(not using Pl/Java codes directly),we can build something on the lines of Multicorn(a nice suggestion by Hitoshi) http://multicorn.org/ On the other hand,as suggested by John,we can use the Pl/Java routines that already exist to build our FDW's API.This shall be the flow: user application -> SQL -> PLjava FDW functions -> pljava code -> JDBC -> foreign database The user will have to pass security levels and permissions before being able to get to the FDW.This would look to the user very much like dblink looks now, and have similar security issues and mitigations. Please let me know how to proceed further. Atri