From atri.jiit@gmail.com Sat Apr 7 11:08:05 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 706D611ADB88; Sat, 7 Apr 2012 08:08:05 -0300 (ADT) Received: from mail-pb0-f46.google.com ([209.85.160.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SGTUw-0004fE-Q1; Sat, 07 Apr 2012 11:08:04 +0000 Received: by pbcun15 with SMTP id un15so3434443pbc.19 for ; Sat, 07 Apr 2012 04:07:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:mime-version:content-type:x-mailer :thread-index:content-language; bh=QZI75SO68smD6/JEdkfxyqcIKYNNX7uL4WoNzS6TH7A=; b=pJOlFNmVcbsX6+tQQQdCmvq7FlLIC1inFjDev2dBpHjLd9cM/EPBqCuSUQ/FNeLxIl yhOHTP5PkPOGVgiceyidEA9T/7as1+fWivRwz+Kmu72OUPdnJleCCXo3bAJPdLZ1kIVx wDqRtdkdrkd7lBa1Lzpf0bD2xvNporBdZl7HjMojgYdWUmlpKMF4h5555nDNO1j4wOFb vBdIZzN2kTglgmQZJnnt7CnenSG+iFaKtSlElSEBkEF6Ocs5acH44mNoFNC0OhiidP7w LxHjWmaaPA+3TygU6zFRU39YycZI5LH/Z+CZXBW3m5yfoigXWgt7jTZAhI7ikk7FREED yoaQ== Received: by 10.68.74.97 with SMTP id s1mr3048234pbv.46.1333796870003; Sat, 07 Apr 2012 04:07:50 -0700 (PDT) Received: from GITCPC ([122.177.244.126]) by mx.google.com with ESMTPS id ko12sm8936033pbb.52.2012.04.07.04.07.47 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 07 Apr 2012 04:07:49 -0700 (PDT) From: "Atri Sharma" To: "'Pg Hackers'" , Subject: Regarding GSoc Application Date: Sat, 7 Apr 2012 16:37:36 +0530 Message-ID: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_002A_01CD14DC.C04FD370" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac0UrqEEg/e/JvIuRiSPXf2V9NMPzg== Content-Language: en-in X-Pg-Spam-Score: 0.1 (/) X-Archive-Number: 201204/334 X-Sequence-Number: 206137 This is a multi-part message in MIME format. ------=_NextPart_000_002A_01CD14DC.C04FD370 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi All, I submitted a GSoc application yesterday. Please review it and let me know if anyone needs any clarifications. Atri ------=_NextPart_000_002A_01CD14DC.C04FD370 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi = All,

 

I submitted a GSoc application yesterday. Please = review it and let me know if anyone needs any = clarifications.

 

Atri

------=_NextPart_000_002A_01CD14DC.C04FD370-- From pg@fastcrypt.com Sun Apr 8 16:13:04 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id A7CD1B1062A; Sun, 8 Apr 2012 13:13:04 -0300 (ADT) Received: from mail-ee0-f46.google.com ([74.125.83.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SGsc0-0002PB-5k; Sun, 08 Apr 2012 13:57:02 +0000 Received: by eekc41 with SMTP id c41so959112eek.19 for ; Sun, 08 Apr 2012 06:56:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=mmtxLuhoEi3ahwwnzR2Yt42YLKPsJyDuvVa8JL554ZM=; b=VCRKyKpeqpwhGe3feuKhBQhjsHxVmuZ0tLI/VgVYuMduqAEuAG5WYj2qTZ8wNjI8gl Elj63jLhRlNZ3oGgxuNNUgsWi5CvUA+lyNcJOqARlyVU9VYWEI6+rNi59EjnVoL9D/6d 0Nt/SDrQ/4tAZWOft6n1StRqObprwa9lfdAs4HJNJ9FkKKyCMpJ7iEORvJB9S3E/KO7F ZyoNZWAIvmXNvmfoPCUZQBJPUw5+ChX5yywlyYU9hr6zNKIFzG+bvluyM6X5VKW0EAot wJ5IRSme3mbWKowYHVs2NPvUvts/V9tL0k4JIqnJpki4lhgrvClaB3RY8ZXuTLtbSRAY jBAQ== Received: by 10.14.28.131 with SMTP id g3mr493704eea.54.1333893407054; Sun, 08 Apr 2012 06:56:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.34.71 with HTTP; Sun, 8 Apr 2012 06:56:26 -0700 (PDT) In-Reply-To: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> References: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> From: Dave Cramer Date: Sun, 8 Apr 2012 09:56:26 -0400 X-Google-Sender-Auth: tAX5JQXfs0F_do3Qw5M4E4xkaqQ Message-ID: Subject: Re: [JDBC] Regarding GSoc Application To: Atri Sharma Cc: Pg Hackers , pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201204/354 X-Sequence-Number: 206157 Hi Atri, Is there some JDBC API that supports this in newer versions of the API ? Dave Cramer dave.cramer(at)credativ(dot)ca http://www.credativ.ca On Sat, Apr 7, 2012 at 7:07 AM, Atri Sharma wrote: > Hi All, > > > > I submitted a GSoc application yesterday. Please review it and let me know > if anyone needs any clarifications. > > > > Atri From mmoncure@gmail.com Mon Apr 9 15:45:21 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id AC17A153F34C; Mon, 9 Apr 2012 12:45:21 -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 1SHGmO-0002Fm-RB; Mon, 09 Apr 2012 15:45:21 +0000 Received: by dadz9 with SMTP id z9so6570500dad.33 for ; Mon, 09 Apr 2012 08:45:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=GdCyZQfKocf4KBL3r5GuuERRMfHHIARyf9t0XxZEngQ=; b=yd0BILsRAc6lTVy3IlnzNypVodSYa36qG25KML8iEHe1Yf0EKoVlOoAsezsUWpN48e ONqUkXArp81liA37qb08vFauVlrGdyTHst/KhtRdTFgnKMelNONw2xo0GiPHQrKgzjH9 0CcaAjZyPw2V87n9zb+UNq9grKMLQ7zl6wKKdBB/yq6GoNi8FKwzD6a3eqt0ruU4+QSH 0OcIV1k1i0Sp02o6xg5OR40DxcVHn+SBNdHa3HpG4pVuiMmDjfUxieF3ilEriTe0BlR7 avMuW6YPIZAkJ47oaspecpES9dt4t1Yhq3Juizz/HhpGRAqwqCxCMLCTUCVdyDXq7HqX nLgw== MIME-Version: 1.0 Received: by 10.68.212.161 with SMTP id nl1mr4356694pbc.106.1333986307554; Mon, 09 Apr 2012 08:45:07 -0700 (PDT) Received: by 10.142.202.6 with HTTP; Mon, 9 Apr 2012 08:45:07 -0700 (PDT) In-Reply-To: References: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> Date: Mon, 9 Apr 2012 10:45:07 -0500 Message-ID: Subject: Re: [JDBC] Regarding GSoc Application From: Merlin Moncure To: Dave Cramer Cc: Atri Sharma , Pg Hackers , pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201204/390 X-Sequence-Number: 206193 On Sun, Apr 8, 2012 at 8:56 AM, Dave Cramer wrote: > Hi Atri, > > Is there some JDBC API that supports this in newer versions of the API ? Didn't parse that question. My understanding is that the only JDBC features needed are what's already there, to make connections to databases and execute queries. The GSoC proposal is here: https://google-melange.appspot.com/gsoc/proposal/review/google/gsoc2012/atrisharma/1001 merlin From pg@fastcrypt.com Mon Apr 9 15:47:53 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id D2BD8153F34C; Mon, 9 Apr 2012 12:47:53 -0300 (ADT) Received: from mail-ee0-f46.google.com ([74.125.83.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHGoq-0002Kw-Rd; Mon, 09 Apr 2012 15:47:53 +0000 Received: by eekc41 with SMTP id c41so1115250eek.19 for ; Mon, 09 Apr 2012 08:47:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=aA94lPP4M8SanInA9LhCZZNlW1XwbohpP3M/uMhBZmQ=; b=0ZnV0T9hGPtkG1omlTzqjS+JN1D1oqplxy9CPFw0/n+TW6CdJYVLVBPjNUfyBgqGKl dFpD0MeCov+aV3ODboMJCHqC1I7YZFaVOIe3VBZiHmAsTmXFSMFvuJecESw6YTgbNUPt 2KCfoqgCXMZMt0JYtyY0t0ehA6LPAPw+tP3ZxP3rkwhlRCxCpIfSCfWLbOvDAf5RjVna qo1+zJP2FGHk/RitqU5Xl/WYSYzWuU6VujecnYigx5iOAL/wTIeh5Zn25N1ML3CV5wlV Wei+jTfcuLvYzw8g7AzlWYnNf4hj3O7c/ZRGkdAIwoAOPZ4vkORFY7qWcGT0kzFpcfx6 yX7w== Received: by 10.14.39.197 with SMTP id d45mr894952eeb.89.1333986459415; Mon, 09 Apr 2012 08:47:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.34.71 with HTTP; Mon, 9 Apr 2012 08:47:19 -0700 (PDT) In-Reply-To: References: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> From: Dave Cramer Date: Mon, 9 Apr 2012 11:47:19 -0400 X-Google-Sender-Auth: lVnTRxComECEZTMadLm87LORKa8 Message-ID: Subject: Re: [JDBC] Regarding GSoc Application To: Merlin Moncure Cc: Atri Sharma , Pg Hackers , pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201204/391 X-Sequence-Number: 206194 How will the user access this? Will it be a normal query through the existing API ? Will it be a private postgresql API ? How will they set it up ? It appears complicated as you have to setup PL/Java as well Dave Cramer dave.cramer(at)credativ(dot)ca http://www.credativ.ca On Mon, Apr 9, 2012 at 11:45 AM, Merlin Moncure wrote: > On Sun, Apr 8, 2012 at 8:56 AM, Dave Cramer wrote: >> Hi Atri, >> >> Is there some JDBC API that supports this in newer versions of the API ? > > Didn't parse that question. =A0My understanding is that the only JDBC > features needed are what's already there, to make connections to > databases and execute queries. > > The GSoC proposal is here: > > https://google-melange.appspot.com/gsoc/proposal/review/google/gsoc2012/a= trisharma/1001 > > merlin From mmoncure@gmail.com Mon Apr 9 15:55:33 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 10299153F34C; Mon, 9 Apr 2012 12:55:33 -0300 (ADT) Received: from mail-pb0-f46.google.com ([209.85.160.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHGwF-0002Vr-NZ; Mon, 09 Apr 2012 15:55:32 +0000 Received: by pbcun15 with SMTP id un15so5153073pbc.19 for ; Mon, 09 Apr 2012 08:55:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=8I6vF3WOpkQDB5cfICgzbqQ+Cp57GJEWmXctPJFZpYo=; b=HMcGGy6qAQR9DkQyJcw0J7Z2af/GsRtFLroA1NMMGqW2YpEBajhyT+zZXNRMUGXT6w BR53Ho8ny4n3khJjK6C0LfjazOUr+j/Ip1TsHDiyOv865gp5dhVeyXwAXnPQfKAQLRr3 2bji3nH7Rr0gZL7w2AYHCD1lhr/ghDCOHm40pdWH3MnmpLr1+pJR/g7/e4CgYupWqhdl tU3C2cDKfZOc/vQG1LITPyIkDklu/xUW0O17CwcqhXFf+1bTUn20R8Okm9kvUPJbYj5b IOneqLHBM0APneGLXwOUzfPT6kqaNWHh6rWnzYAuyIy5VHDimrYgLCUx0OwH6+WgYYsF hfwQ== MIME-Version: 1.0 Received: by 10.68.212.161 with SMTP id nl1mr4437285pbc.106.1333986915327; Mon, 09 Apr 2012 08:55:15 -0700 (PDT) Received: by 10.142.202.6 with HTTP; Mon, 9 Apr 2012 08:55:15 -0700 (PDT) In-Reply-To: References: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> Date: Mon, 9 Apr 2012 10:55:15 -0500 Message-ID: Subject: Re: [JDBC] Regarding GSoc Application From: Merlin Moncure To: Dave Cramer Cc: Atri Sharma , Pg Hackers , pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201204/392 X-Sequence-Number: 206195 On Mon, Apr 9, 2012 at 10:47 AM, Dave Cramer wrote: > How will the user access this? Will it be a normal query through the > existing API ? Will it be a private postgresql API ? > > How will they set it up ? It appears complicated as you have to setup > PL/Java as well Yeah -- it will run through pl/java (at least, that's the idea). What pl/java brings to the table is well thought out integration of the JVM to postgres so that you can invoke java as functions from postgres. PL/java of course is a heavy dependency and non-trivial to set up and install. But to access the jdbc from postgres I think it's the easiest way forward. Straight JNI to the JVM from FDW might be a better/cleaner route but we haven't done the research to see exactly what's involved there. I suspect that invoking java from postgres is non trivial any way you slice it and that's not a wheel worth re-inventing. In other words, the basic idea is to do two things: a dblink-ish wrapper for JDBC via pl/java and a FDW wrapper through that via SPI. Better ideas and criticism are welcome of course. merlin From pg@fastcrypt.com Mon Apr 9 16:14:37 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 2972D153F352; Mon, 9 Apr 2012 13:14:37 -0300 (ADT) Received: from mail-ey0-f174.google.com ([209.85.215.174]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHHEi-0002mV-6Q; Mon, 09 Apr 2012 16:14:36 +0000 Received: by eaaq12 with SMTP id q12so1098794eaa.19 for ; Mon, 09 Apr 2012 09:14:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=dRCvHWgruiFApcXCMUN9onFIBGIjWceXDPL6qkO6yPg=; b=0LFU7gI+JEu+wbFci7gruIUJIYNiRBTbseXWyYcjwrv6FPWCLhTj2+tjcd7FtdEDtO VX9z5JPV2itYuoo3+Zg3wDsDX7KxpsYmK8+yrcg9tbDmGuVHsYpEUW5rN8FlFm6ZIavT ObwP2+lLMlzf2/AmP74gKVMCM7dhSYo+Ec6+3nIvQASTNrdHcEuhB8yjv19WcAkx1tT7 TAWPQt6oHwHVEucOmmqFr85kDGPJS2HyjBzl5Y/1TRxG4FlauFWDUzOhZWxTlRGUJlVf EvOPn0awSXmpsVmWhL9jy1bXFarwf5MZdQORDyDNhF7ab/PdEgBkgKyj0WaxJ5qm3RwW EYmQ== Received: by 10.14.127.204 with SMTP id d52mr925622eei.18.1333988063045; Mon, 09 Apr 2012 09:14:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.34.71 with HTTP; Mon, 9 Apr 2012 09:14:02 -0700 (PDT) In-Reply-To: References: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> From: Dave Cramer Date: Mon, 9 Apr 2012 12:14:02 -0400 X-Google-Sender-Auth: PdN8eb57Hw9JYQGRLH7zFd3AXe0 Message-ID: Subject: Re: [JDBC] Regarding GSoc Application To: Merlin Moncure Cc: Atri Sharma , Pg Hackers , pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201204/393 X-Sequence-Number: 206196 On Mon, Apr 9, 2012 at 11:55 AM, Merlin Moncure wrote: > On Mon, Apr 9, 2012 at 10:47 AM, Dave Cramer wrote: >> How will the user access this? Will it be a normal query through the >> existing API ? Will it be a private postgresql API ? >> >> How will they set it up ? It appears complicated as you have to setup >> PL/Java as well > > Yeah -- it will run through pl/java (at least, that's the idea). What > pl/java brings to the table is well thought out integration of the JVM > to postgres so that you can invoke java as functions from postgres. > PL/java of course is a heavy dependency and non-trivial to set up and > install. =A0But to access the jdbc from postgres I think it's the > easiest way forward. =A0Straight JNI to the JVM from FDW might be a > better/cleaner route but we haven't done the research to see exactly > what's involved there. =A0I suspect that invoking java from postgres is > non trivial any way you slice it and that's not a wheel worth > re-inventing. > > In other words, the basic idea is to do two things: a dblink-ish > wrapper for JDBC via pl/java and a FDW wrapper through that via SPI. > Better ideas and criticism are welcome of course. > > merlin So I'm confused, once they link a file to an FDW can't you just read it with an normal select ? What additional functionality will this provide ? Dave From mmoncure@gmail.com Mon Apr 9 16:37:51 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 8C516153F352; Mon, 9 Apr 2012 13:37:51 -0300 (ADT) Received: from mail-pb0-f46.google.com ([209.85.160.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHHbC-0003Ct-PV; Mon, 09 Apr 2012 16:37:51 +0000 Received: by pbcun15 with SMTP id un15so5192974pbc.19 for ; Mon, 09 Apr 2012 09:37:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=g7JcL0SO4mRF9qTBMDCxKRT71wWMmyqWyZoKIORBe24=; b=R9Dgb9YpEbFh4W9yUg9PfruFsmyIFwhDQgH7tJMa2IabZx4WoCRvDCVni9XX2B5giZ AJtNULg7n5tUc+pdPxYt8GYOMQ6VtXievv4qQh9+B/5AJTs3jDdd6iSG65En5fCrCygn B7DlKF2YmLLvtg97HEfZ7SlKmflcMzKtxuWHu3ngAb2S509rO0MlwgA3gSM9AXlQcZNj bc3d5AjHimGsijMC6SwH7VVUWPdsRFqgI50VAXY47kEwI1zItHYDQrfM8B8nB+3vRarQ x6xUvGYnl/EJuy1LIpRw+qYGciFqVCqnht0XdINGfvrS/LVhZ+elL6GtO6vywEjj8G9C D3Og== MIME-Version: 1.0 Received: by 10.68.217.67 with SMTP id ow3mr21322142pbc.16.1333989458103; Mon, 09 Apr 2012 09:37:38 -0700 (PDT) Received: by 10.142.202.6 with HTTP; Mon, 9 Apr 2012 09:37:38 -0700 (PDT) In-Reply-To: References: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> Date: Mon, 9 Apr 2012 11:37:38 -0500 Message-ID: Subject: Re: [JDBC] Regarding GSoc Application From: Merlin Moncure To: Dave Cramer Cc: Atri Sharma , Pg Hackers , pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201204/396 X-Sequence-Number: 206199 On Mon, Apr 9, 2012 at 11:14 AM, Dave Cramer wrote: > So I'm confused, once they link a file to an FDW can't you just read > it with an normal select ? > > What additional functionality will this provide ? > > Dave The basic objective is to expose the JDBC to postgres for grabbing external data. FDW is a C API and JDBC is java routines so the main challenge is to figure out how to jump from a FDW call into java. pl/java is one way to solve that problem. Once done, you should be able to FDW to any jdbc supporting data source, which is basically everything. merlin From andrew@dunslane.net Mon Apr 9 16:46:18 2012 Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id DE344153F352; Mon, 9 Apr 2012 13:46:18 -0300 (ADT) Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHHjK-000471-8c; Mon, 09 Apr 2012 16:46:17 +0000 X-Originating-IP: 217.70.178.136 Received: from mfilter7-d.gandi.net (mfilter7-d.gandi.net [217.70.178.136]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id D0183A808D; Mon, 9 Apr 2012 18:45:50 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter7-d.gandi.net Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter7-d.gandi.net (mfilter7-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 1GKX1oqRPLIW; Mon, 9 Apr 2012 18:45:49 +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 relay3-d.mail.gandi.net (Postfix) with ESMTPSA id E6710A8097; Mon, 9 Apr 2012 18:45:47 +0200 (CEST) Message-ID: <4F831234.7040209@dunslane.net> Date: Mon, 09 Apr 2012 12:45:40 -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: Dave Cramer CC: Merlin Moncure , Atri Sharma , Pg Hackers , pgsql-jdbc@postgresql.org Subject: Re: [JDBC] Regarding GSoc Application References: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> 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/398 X-Sequence-Number: 206201 On 04/09/2012 12:14 PM, Dave Cramer wrote: > > So I'm confused, once they link a file to an FDW can't you just read > it with an normal select ? > > What additional functionality will this provide ? > I'm confused about what you're confused about. Surely this won't be linking files to an FDW, but foreign DBMS tables, in anything you can access via JDBC. 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; cheers andrew From pg@fastcrypt.com Mon Apr 9 17:07:38 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id CC6AF153F352; Mon, 9 Apr 2012 14:07:38 -0300 (ADT) Received: from mail-ey0-f174.google.com ([209.85.215.174]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHI41-0003kZ-67; Mon, 09 Apr 2012 17:07:38 +0000 Received: by eaaq12 with SMTP id q12so1109003eaa.19 for ; Mon, 09 Apr 2012 10:07:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=USA/yl9F9ZM5VemtzymBW9DDvr3lqlxvWKq82T4dUfU=; b=Wbj3k3oBuwTBlUVFsHij6/hpfa+XQjG54nH8cVXIiGvqJwwrlaNIJ7y+HS9R834wqu rJJhmRlzVvblEMjgXGb1u2Ch89zZu5HurJjTQqf90EM+KWKowT/e70UKwAQBbhmyDYXF eGTZyRWL5dSgeIYCT4Q9wkzl/SplCBnqA815MpOEGCKXwR+Kmwn0PqmdTgf/SJB+PFB2 qUGQyHAoNfKX96v0k8zTehxEQyPUV/dFRWAqdLK3usiZHpv9Stg3oTh9R11igASXhQHH TgC9Rpq5giOFINtl2GnHwC1OV41uyxICdJAb82fmnGVbCauZjbqGEstkd+WSxUXH8lN8 MqRg== Received: by 10.14.39.197 with SMTP id d45mr922668eeb.89.1333991243164; Mon, 09 Apr 2012 10:07:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.34.71 with HTTP; Mon, 9 Apr 2012 10:07:00 -0700 (PDT) In-Reply-To: <4F831234.7040209@dunslane.net> References: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> <4F831234.7040209@dunslane.net> From: Dave Cramer Date: Mon, 9 Apr 2012 13:07:00 -0400 X-Google-Sender-Auth: lui3YE7OXWPHlpKb47nY-ltdqvw Message-ID: Subject: Re: [JDBC] Regarding GSoc Application To: Andrew Dunstan Cc: Merlin Moncure , Atri Sharma , Pg Hackers , pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201204/399 X-Sequence-Number: 206202 On Mon, Apr 9, 2012 at 12:45 PM, Andrew Dunstan wrote= : > > > On 04/09/2012 12:14 PM, Dave Cramer wrote: >> >> >> So I'm confused, once they link a file to an FDW can't you just read >> it with an normal select ? >> >> What additional functionality will this provide ? >> > > > > I'm confused about what you're confused about. Surely this won't be linki= ng > files to an FDW, but foreign DBMS tables, in anything you can access via > JDBC. All you'll need on the postgres side is the relevant JDBC driver, s= o > 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: > > =A0 CREATE FOREIGN DATA WRAPPER foodb HANDLER pljava_jdbc_handler > =A0 OPTIONS (driver 'jdbc.foodb.org'); > =A0 CREATE SERVER myfoodb FOREIGN DATA WRAPPER foodb OPTIONS(host > =A0 '1.2.3.4', user 'foouser', password 'foopw'); > =A0 CREATE FOREIGN TABLE footbl (id int, data text) SERVER myfoodb; > =A0 SELECT * from footbl; > Well this is certainly more explanation than we have so far. Is this the intended use case ? Dave From Kevin.Grittner@wicourts.gov Mon Apr 9 17:19:28 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id D7958153F352; Mon, 9 Apr 2012 14:19:28 -0300 (ADT) Received: from gwmta.wicourts.gov ([165.219.244.99] helo=gw.wicourts.gov) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHIFS-0003uk-W5; Mon, 09 Apr 2012 17:19:28 +0000 Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Mon, 09 Apr 2012 12:19:13 -0500 Message-Id: <4F82D3BE0200002500046CE1@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.2 Date: Mon, 09 Apr 2012 12:19:10 -0500 From: "Kevin Grittner" To: "Andrew Dunstan" , "Dave Cramer" Cc: "Atri Sharma" , "Merlin Moncure" , "Pg Hackers" , Subject: Re: [JDBC] Regarding GSoc Application References: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> <4F831234.7040209@dunslane.net> In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201204/400 X-Sequence-Number: 206203 Dave Cramer wrote: > Andrew Dunstan 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 From atri.jiit@gmail.com Mon Apr 9 17:33:39 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 360E6153F357; Mon, 9 Apr 2012 14:33:39 -0300 (ADT) Received: from mail-vx0-f174.google.com ([209.85.220.174]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHITA-0004Fm-MP; Mon, 09 Apr 2012 17:33:38 +0000 Received: by vcqp1 with SMTP id p1so1941149vcq.19 for ; Mon, 09 Apr 2012 10:33:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=U/8qn1d4ODXDRS9nXPOkw1MF7aApKiD9T1L8ypN/e0A=; b=AbwzaZkfV+SIJQG1qDE/CEQ+MgC0eJh60NJRSd3+MlnCywu2+DU9tKC+9HI395wobT q59h0Q/+rYM4ZJQbVEGUi+L8DkqRnVJl12SY3KoouV7XVKuBj+Vep1Sx9383TUWlzOog hHvqb14ZMAxWHLD2QZBnEbx+hVoNmJ6aQiarku0/OmoDpGARVwqSjAFs7xIcaLI6oZHi 7eBbkYz7xYRIzfIIO2gzdb55Cn/7qhEvoq8tc5of/dM1Oy1kFOSORnUEOMbMrDTdMurD hG6q0rGuarFHpykDXKjC3f1+8XCbfqyMjOp6paWM0Cd3nLm/HkeqhArUrhicFI6UJPrO cSlg== MIME-Version: 1.0 Received: by 10.220.217.72 with SMTP id hl8mr4017287vcb.3.1333992358417; Mon, 09 Apr 2012 10:25:58 -0700 (PDT) Received: by 10.52.68.83 with HTTP; Mon, 9 Apr 2012 10:25:58 -0700 (PDT) In-Reply-To: <4F831234.7040209@dunslane.net> References: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> <4F831234.7040209@dunslane.net> Date: Mon, 9 Apr 2012 22:55:58 +0530 Message-ID: Subject: Re: [JDBC] Regarding GSoc Application From: Atri Sharma To: Andrew Dunstan Cc: Dave Cramer , Merlin Moncure , Pg Hackers , pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201204/404 X-Sequence-Number: 206207 On Mon, Apr 9, 2012 at 10:15 PM, Andrew Dunstan wrote= : > > > On 04/09/2012 12:14 PM, Dave Cramer wrote: >> >> >> So I'm confused, once they link a file to an FDW can't you just read >> it with an normal select ? >> >> What additional functionality will this provide ? >> > > > > I'm confused about what you're confused about. Surely this won't be linki= ng > files to an FDW, but foreign DBMS tables, in anything you can access via > JDBC. All you'll need on the postgres side is the relevant JDBC driver, s= o > 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: > > =A0 CREATE FOREIGN DATA WRAPPER foodb HANDLER pljava_jdbc_handler > =A0 OPTIONS (driver 'jdbc.foodb.org'); > =A0 CREATE SERVER myfoodb FOREIGN DATA WRAPPER foodb OPTIONS(host > =A0 '1.2.3.4', user 'foouser', password 'foopw'); > =A0 CREATE FOREIGN TABLE footbl (id int, data text) SERVER myfoodb; > =A0 SELECT * from footbl; > > > cheers > > andrew Hi Andrew, Thanks for going through my proposal and commenting on it. I think you have hit the nail on the head.We will be connecting the foreign DBMS tables.The main aim of the project is to wrap JDBC so we can connect to anything that can be reached through a JDBC URL. 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). Please let me know your further comments and also,please advise me on how to proceed further. Atri --=20 Regards, Atri l'apprenant From mmoncure@gmail.com Mon Apr 9 18:10:21 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 8E5B7153F352; Mon, 9 Apr 2012 15:10:21 -0300 (ADT) Received: from mail-pb0-f46.google.com ([209.85.160.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHJ2g-00053F-Fi; Mon, 09 Apr 2012 18:10:21 +0000 Received: by pbcun15 with SMTP id un15so5273960pbc.19 for ; Mon, 09 Apr 2012 11:10:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=YzUkvGVdAFXAYxBG3phb5TxcQPxJFV436V/V2YQ0spQ=; b=ZAlDiYEEVEbqJhe3cNTk7IwYydOIYtd915eKTgeNRgzf4D2IeEQk1qgXXG9nOkcGR9 mQv9xxhxyVU0TVFX4mAxwIhfsyfcpjoxc6Dux5cr13terDYiVYDJVMeuGflghO/E9wKn Ngk8FzZWNm5qvyqqxjbbuV2ED84lL8qu0/1LymG76+KVWRqVhDBgFGvw1dzVxBGnIyPf D0dqqjHK1EIjXHYdvQCay3d1lO5RM1I3SIotmHNKy3PGfdHQ2rA885IrUvF4wm8E2ZGK gAr6BOIWB+P943f9YZdUhu1FOqm+Qmn1Sz7OPdhEdAphlC+YWPLDteYFTXDqe7RDt7hK 4Jzg== MIME-Version: 1.0 Received: by 10.68.213.231 with SMTP id nv7mr606483pbc.106.1333995005739; Mon, 09 Apr 2012 11:10:05 -0700 (PDT) Received: by 10.142.202.6 with HTTP; Mon, 9 Apr 2012 11:10:05 -0700 (PDT) In-Reply-To: References: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> <4F831234.7040209@dunslane.net> Date: Mon, 9 Apr 2012 13:10:05 -0500 Message-ID: Subject: Re: [JDBC] Regarding GSoc Application From: Merlin Moncure To: Atri Sharma Cc: Andrew Dunstan , Dave Cramer , Pg Hackers , pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201204/410 X-Sequence-Number: 206213 On Mon, Apr 9, 2012 at 12:25 PM, Atri Sharma wrote: > On Mon, Apr 9, 2012 at 10:15 PM, Andrew Dunstan wro= te: >> On 04/09/2012 12:14 PM, Dave Cramer wrote: >>> So I'm confused, once they link a file to an FDW can't you just read >>> it with an normal select ? >>> >>> What additional functionality will this provide ? >>> >> >> >> >> I'm confused about what you're confused about. Surely this won't be link= ing >> files to an FDW, but foreign DBMS tables, in anything you can access via >> JDBC. 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 ca= n >> get a JDBC driver to talk to. That seems to me something worth having. >> >> I imagine it would look rather like this: >> >> =A0 CREATE FOREIGN DATA WRAPPER foodb HANDLER pljava_jdbc_handler >> =A0 OPTIONS (driver 'jdbc.foodb.org'); >> =A0 CREATE SERVER myfoodb FOREIGN DATA WRAPPER foodb OPTIONS(host >> =A0 '1.2.3.4', user 'foouser', password 'foopw'); >> =A0 CREATE FOREIGN TABLE footbl (id int, data text) SERVER myfoodb; >> =A0 SELECT * from footbl; >> >> >> cheers >> >> andrew > > Hi Andrew, > > Thanks for going through my proposal and commenting on it. > > I think you have hit the nail on the head.We will be connecting the > foreign DBMS tables.The main aim of the project is to wrap JDBC so we > can connect to anything that can be reached through a JDBC URL. > > 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). > > Please let me know your further comments and also,please advise me on > how to proceed further. I think the best way to go is as planned. Step one is to get pl/java installed and attempt a minimal set of functions that can connect to and gather data from an external source...let's start with pl/java 'hello world' and go from there. Once done it's time to start thinking about how the java internals will look like -- we can crib from dblink for that though. merlin From atri.jiit@gmail.com Mon Apr 9 18:12:05 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 19356153F352; Mon, 9 Apr 2012 15:12:05 -0300 (ADT) Received: from mail-vx0-f174.google.com ([209.85.220.174]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHJ4N-0005BL-Ql; Mon, 09 Apr 2012 18:12:04 +0000 Received: by vcqp1 with SMTP id p1so1968699vcq.19 for ; Mon, 09 Apr 2012 11:11:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=lks7S25QIrsPgWTAA3pn77SgFL7wL3gKzze1StIy1i4=; b=wn+DM0oHdBzBgbDIW8pN2J1BSJ2S5wJQpwytdZy3ag6n4yvQkpK7hc/Uv798zIzvXr iX8ssG/w8Wn2+dOBm5EnPZ56wdPq9opWCSJrrr1S5uL5ErWn3NwpUelXJB2LYQBgAmTn sB2GMLi/hgDgqtQdbM2lpZ2zVfad3y+Yug9dlEZAgP6xvhgeWwC+aaKbbvYcRTT6Y6mw 89RR5NQ0Gi9tljEILLbSvZYneml7LyqOudC2PCC1nPZDGOXbd4etjAtbbynvcLlTFLm8 R2n5d337N2UYMhkxBTZ/SZ5K+e336HZMH7Px31VlWXJC8UM4DgZBDccCJMJDcW4fbOH7 QNag== MIME-Version: 1.0 Received: by 10.52.240.170 with SMTP id wb10mr3352431vdc.58.1333995111354; Mon, 09 Apr 2012 11:11:51 -0700 (PDT) Received: by 10.52.68.83 with HTTP; Mon, 9 Apr 2012 11:11:51 -0700 (PDT) In-Reply-To: References: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> <4F831234.7040209@dunslane.net> Date: Mon, 9 Apr 2012 23:41:51 +0530 Message-ID: Subject: Re: [JDBC] Regarding GSoc Application From: Atri Sharma To: Merlin Moncure Cc: Andrew Dunstan , Dave Cramer , Pg Hackers , pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201204/411 X-Sequence-Number: 206214 On Mon, Apr 9, 2012 at 11:40 PM, Merlin Moncure wrote: > On Mon, Apr 9, 2012 at 12:25 PM, Atri Sharma wrote: >> On Mon, Apr 9, 2012 at 10:15 PM, Andrew Dunstan wr= ote: >>> On 04/09/2012 12:14 PM, Dave Cramer wrote: >>>> So I'm confused, once they link a file to an FDW can't you just read >>>> it with an normal select ? >>>> >>>> What additional functionality will this provide ? >>>> >>> >>> >>> >>> I'm confused about what you're confused about. Surely this won't be lin= king >>> files to an FDW, but foreign DBMS tables, in anything you can access vi= a >>> JDBC. 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 c= an >>> get a JDBC driver to talk to. That seems to me something worth having. >>> >>> I imagine it would look rather like this: >>> >>> =A0 CREATE FOREIGN DATA WRAPPER foodb HANDLER pljava_jdbc_handler >>> =A0 OPTIONS (driver 'jdbc.foodb.org'); >>> =A0 CREATE SERVER myfoodb FOREIGN DATA WRAPPER foodb OPTIONS(host >>> =A0 '1.2.3.4', user 'foouser', password 'foopw'); >>> =A0 CREATE FOREIGN TABLE footbl (id int, data text) SERVER myfoodb; >>> =A0 SELECT * from footbl; >>> >>> >>> cheers >>> >>> andrew >> >> Hi Andrew, >> >> Thanks for going through my proposal and commenting on it. >> >> I think you have hit the nail on the head.We will be connecting the >> foreign DBMS tables.The main aim of the project is to wrap JDBC so we >> can connect to anything that can be reached through a JDBC URL. >> >> 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). >> >> Please let me know your further comments and also,please advise me on >> how to proceed further. > > I think the best way to go is as planned. =A0Step one is to get pl/java > installed and attempt a minimal set of functions that can connect to > and gather data from an external source...let's start with pl/java > 'hello world' and go from there. =A0Once done it's time to start > thinking about how the java internals will look like -- we can crib > from dblink for that though. > > merlin I agree,this should be the correct path. Atri --=20 Regards, Atri l'apprenant From andrew@dunslane.net Tue Apr 10 13:42:37 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 9BDEC189E838; Tue, 10 Apr 2012 10:42:37 -0300 (ADT) Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHbL9-0007sH-2p; Tue, 10 Apr 2012 13:42:37 +0000 X-Originating-IP: 217.70.178.148 Received: from mfilter20-d.gandi.net (mfilter20-d.gandi.net [217.70.178.148]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id 0D8C4A80BB; Tue, 10 Apr 2012 15:42:11 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter20-d.gandi.net Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter20-d.gandi.net (mfilter20-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id DSoxt+7kCgro; Tue, 10 Apr 2012 15:42:09 +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 relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 4D7A1A80C5; Tue, 10 Apr 2012 15:42:08 +0200 (CEST) Message-ID: <4F8438AD.7060503@dunslane.net> Date: Tue, 10 Apr 2012 09:42:05 -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: Atri Sharma CC: Dave Cramer , Merlin Moncure , Pg Hackers , pgsql-jdbc@postgresql.org Subject: Re: [JDBC] Regarding GSoc Application References: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> <4F831234.7040209@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/452 X-Sequence-Number: 206255 On 04/09/2012 01:25 PM, Atri Sharma wrote: > On Mon, Apr 9, 2012 at 10:15 PM, Andrew Dunstan wrote: >> >> On 04/09/2012 12:14 PM, Dave Cramer wrote: >>> >>> So I'm confused, once they link a file to an FDW can't you just read >>> it with an normal select ? >>> >>> What additional functionality will this provide ? >>> >> >> >> I'm confused about what you're confused about. Surely this won't be linking >> files to an FDW, but foreign DBMS tables, in anything you can access via >> JDBC. 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; >> >> >> cheers >> >> andrew > Hi Andrew, > > Thanks for going through my proposal and commenting on it. > > I think you have hit the nail on the head.We will be connecting the > foreign DBMS tables.The main aim of the project is to wrap JDBC so we > can connect to anything that can be reached through a JDBC URL. > > 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. cheers andrew From mmoncure@gmail.com Tue Apr 10 13:48:57 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 5E6A2189E838; Tue, 10 Apr 2012 10:48:57 -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 1SHbRI-00081L-JO; Tue, 10 Apr 2012 13:48:57 +0000 Received: by dadz9 with SMTP id z9so8053176dad.33 for ; Tue, 10 Apr 2012 06:48:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=N9xHE5Gp/XNDAlMEbERKqBuOXkVacUznwluzegsCmHg=; b=odFzadvjdat4XFg74MdI1iGI2kZoCjPuj3nPIOvSv2zD9ioiea6UwggRaMb5tkdYKd qacg0/oxQu0BYmPCS8iL4Kr2b/G4TZx3wSv0+iOC8VQF3c8VuVZp0BWJBSURxsKsj/63 qRw/VbkmM0p97YklQ2fo+D1ik+/+840SlEnYpiyIZVqbMGo9THyMKbcBYXUWzMn6HX2a /MH9iIKCh8MixJ3dFf+UzNay91q0UD0pIKoFqmzQnRdgQJgXz872L6KxKUchem1Xrngt LiVIh61lp8QGjkEEeaEvz+ykoc+p/pDouTA5NAhXfNPcclZnJOVZeeaR2scD9SRStnw8 vRNQ== MIME-Version: 1.0 Received: by 10.68.134.8 with SMTP id pg8mr12251843pbb.152.1334065723727; Tue, 10 Apr 2012 06:48:43 -0700 (PDT) Received: by 10.142.202.6 with HTTP; Tue, 10 Apr 2012 06:48:43 -0700 (PDT) In-Reply-To: <4F8438AD.7060503@dunslane.net> References: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> <4F831234.7040209@dunslane.net> <4F8438AD.7060503@dunslane.net> Date: Tue, 10 Apr 2012 08:48:43 -0500 Message-ID: Subject: Re: [JDBC] Regarding GSoc Application From: Merlin Moncure To: Andrew Dunstan Cc: Atri Sharma , Dave Cramer , Pg Hackers , pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201204/454 X-Sequence-Number: 206257 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? merlin From andrew@dunslane.net Tue Apr 10 14:16:05 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id EB861189E83A; Tue, 10 Apr 2012 11:16:05 -0300 (ADT) Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHbrY-00008m-I3; Tue, 10 Apr 2012 14:16:05 +0000 X-Originating-IP: 217.70.178.129 Received: from mfilter12-d.gandi.net (mfilter12-d.gandi.net [217.70.178.129]) by relay3-d.mail.gandi.net (Postfix) with ESMTP id 5672FA80AF; Tue, 10 Apr 2012 16:15:41 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter12-d.gandi.net Received: from relay3-d.mail.gandi.net ([217.70.183.195]) by mfilter12-d.gandi.net (mfilter12-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 8sHIDfYp93cp; Tue, 10 Apr 2012 16:15:40 +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 relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 0D89DA808F; Tue, 10 Apr 2012 16:15:38 +0200 (CEST) Message-ID: <4F844089.2050308@dunslane.net> Date: Tue, 10 Apr 2012 10:15:37 -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> 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/458 X-Sequence-Number: 206261 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. cheers andrew From mmoncure@gmail.com Tue Apr 10 14:35:00 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 5AEEC189E83A; Tue, 10 Apr 2012 11:35:00 -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 1SHc9r-0000UZ-54; Tue, 10 Apr 2012 14:34:59 +0000 Received: by dadz9 with SMTP id z9so8116995dad.33 for ; Tue, 10 Apr 2012 07:34:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=tbadCcVyl+j++drLcWE1wfMRKL5eKhyZjm7s3zeZ7Ws=; b=uYcJgZ1VcUxYkp170Eph7+nm2Yacvdt/tf62F/xO3YAes3Uq5qeyysgmsr+uRaKnLW GMtuAtBRUgiFtQ3WcEABGQIX1xRFu3bxR1VLbQcFIzVrfOET9Z2sRE/shvipjGSUGjdJ RYJMsi61IGM65blPCcZFDXclCiUZO+zVeYU9qsae2KOjav1N9AjWDinyT+wrRF6jzfxT exZ0UfwVSOuIJq7Ex6JkvkFawPa/e2QbIxUvXSyaP0Aa4JCIAtfOo5bPtyjWq+4rF3eG Hu7/QsAQRQ1B1oYcwPyx96mwnJDdR7uoRg9ZkRh8eVUHi8gxR5tZ0Q1pMnBrMJOnf5j3 E6EA== MIME-Version: 1.0 Received: by 10.68.134.8 with SMTP id pg8mr12560470pbb.152.1334068486094; Tue, 10 Apr 2012 07:34:46 -0700 (PDT) Received: by 10.142.202.6 with HTTP; Tue, 10 Apr 2012 07:34:46 -0700 (PDT) In-Reply-To: <4F844089.2050308@dunslane.net> References: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> <4F831234.7040209@dunslane.net> <4F8438AD.7060503@dunslane.net> <4F844089.2050308@dunslane.net> Date: Tue, 10 Apr 2012 09:34:46 -0500 Message-ID: Subject: Re: [JDBC] Regarding GSoc Application From: Merlin Moncure To: Andrew Dunstan Cc: Atri Sharma , Dave Cramer , Pg Hackers , pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201204/462 X-Sequence-Number: 206265 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 >> =A0wrote: >>>> >>>> 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 implemen= t >>> 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. A= t > least that would be my first approach to writing a DBI::DBD FDW wrapper f= or > 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. merlin From andrew@dunslane.net Tue Apr 10 14:48:13 2012 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 From mmoncure@gmail.com Tue Apr 10 15:11:12 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id B8ADE189E83A; Tue, 10 Apr 2012 12:11:12 -0300 (ADT) Received: from mail-pb0-f46.google.com ([209.85.160.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHcit-0001Ie-Nl; Tue, 10 Apr 2012 15:11:12 +0000 Received: by pbcun15 with SMTP id un15so74725pbc.19 for ; Tue, 10 Apr 2012 08:10:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=JwJ1sIqdbfXSXwGgTvKie1qrzAU4N2vwe4WjuOSHO+0=; b=E5NKnlJAhFbeXf4pnynmC/h98tYUCPauGNarj/BGBHL4CAyxoYsjyp60KgN/dcTMN9 mHOshmnPRY7xhx+2YQ+Rv5ZHufwnEqOVCQY/qIdAKCoho7L4D7iO61yAcvIUWw9Nwf1z aDpaO/9Av68fiSpsb6+Z0Y5syh0LLT2ygu5keIf2KnkNAY24HiuN+srBmdYrxBw7VUid USqPkZiUt6w91BVHm0wVx93N1lds4tVYTtMZ5WGHcAdmX3MI8W/1BtWeTpeXw8zStTcR EaSNlxvB4FWp0fdhtawec1nKNOvsYYznivfP/iYO3H8IDlrbTvE7tah7EM8TiclVgssX FhzA== MIME-Version: 1.0 Received: by 10.68.213.231 with SMTP id nv7mr8436216pbc.106.1334070658942; Tue, 10 Apr 2012 08:10:58 -0700 (PDT) Received: by 10.142.202.6 with HTTP; Tue, 10 Apr 2012 08:10:58 -0700 (PDT) In-Reply-To: <4F84480F.1020905@dunslane.net> References: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> <4F831234.7040209@dunslane.net> <4F8438AD.7060503@dunslane.net> <4F844089.2050308@dunslane.net> <4F84480F.1020905@dunslane.net> Date: Tue, 10 Apr 2012 10:10:58 -0500 Message-ID: Subject: Re: [JDBC] Regarding GSoc Application From: Merlin Moncure To: Andrew Dunstan Cc: Atri Sharma , Dave Cramer , Pg Hackers , pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201204/468 X-Sequence-Number: 206271 On Tue, Apr 10, 2012 at 9:47 AM, Andrew Dunstan wrote: > 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. yes, that is correct. > 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? Correct. I think I understand what you're driving at. Basically, pl/java is the glue. my thinking was inside the FDW callbacks to to do SPI calls to invoke the pl/java routines. Unlike other fdw implementations which mostly wrap C libraries -- which makes things very easy since you can directly jump into the routine for foreign execution -- a luxury we don't have. We have to invoke java and there are two basic ways to tie into the java runtime: one is to jump through SPI via the SQL executor. The other is JNI into the pl/java jvm which I think you were hinting was the better approach. Doing an SPI call from a FDW callback is inefficient -- that's an extra call into the executor (although you can prepare it) and you have to walk the SPI result just to build it up again in the FDW iterator. A JNI solution instead would jump into the jvm and do java invocation and I believe would drive the difficulty of this project up a couple of notches whereas a SPI approach utilizes a well documented interface. We're not stuck on the approach though -- I'm pushing Atri to get the environment set up so we can explore alternative solutions. In other words, our proposal is basically pretty similar to what you'd end up with if you wrapped dblink into a fdw making dblink calls inside the fdw over spi. merlin From tgl@sss.pgh.pa.us Tue Apr 10 15:25:22 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 90CC5189E83A; Tue, 10 Apr 2012 12:25:22 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHcwa-0001VE-Gw; Tue, 10 Apr 2012 15:25:22 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id q3AFP5Yw009512; Tue, 10 Apr 2012 11:25:05 -0400 (EDT) To: Merlin Moncure cc: Andrew Dunstan , Atri Sharma , Dave Cramer , Pg Hackers , pgsql-jdbc@postgresql.org Subject: Re: [JDBC] Regarding GSoc Application In-reply-to: References: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> <4F831234.7040209@dunslane.net> <4F8438AD.7060503@dunslane.net> <4F844089.2050308@dunslane.net> <4F84480F.1020905@dunslane.net> Comments: In-reply-to Merlin Moncure message dated "Tue, 10 Apr 2012 10:10:58 -0500" Date: Tue, 10 Apr 2012 11:25:05 -0400 Message-ID: <9511.1334071505@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201204/471 X-Sequence-Number: 206274 Merlin Moncure writes: > ... We have to invoke java and there > are two basic ways to tie into the java runtime: one is to jump > through SPI via the SQL executor. The other is JNI into the pl/java > jvm which I think you were hinting was the better approach. Hm? SPI doesn't know anything about Java either. regards, tom lane From pg@fastcrypt.com Tue Apr 10 15:28:10 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 478C8189E83A; Tue, 10 Apr 2012 12:28:10 -0300 (ADT) Received: from mail-ee0-f46.google.com ([74.125.83.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHczJ-0001cK-Ao; Tue, 10 Apr 2012 15:28:09 +0000 Received: by eekc41 with SMTP id c41so1371124eek.19 for ; Tue, 10 Apr 2012 08:27:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=rLNwmNFwcSJmmmj4m9emmWXjhMvKbBH1hmy30CKThYc=; b=09ZU8s6XEvrao1mTxctUVaLohkWnr6hXmradg+19vTs8f9U0PQyKAyriTNHAkd+WaT 6eUTVRJiMQPxvVdkdt9Q7j5lctYqaxW/poNkmhV4MH3tzf8yZ5+ojXL6oiyV6NdEL74r xatXMMiuQIpAl5m1Ad+lcih9f50bS1dASxttmq5wu1pF7TtWdkh0BKdlEWMqh/A4FVyM rKyCcqOQnN9PQM0wRZ2LKsDTuwnBnvOCaNv05Ll3P4/jkMBO3NJtSsu9NQfb+RhkYHCG iwbHT0i8MZxHHYyu6wmlwdt7CFUUboxRpiZq/q2x6GSD/R6qEsO/LboTeZHSXjbVSOJC 1PBQ== Received: by 10.213.3.156 with SMTP id 28mr675105ebn.227.1334071676153; Tue, 10 Apr 2012 08:27:56 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.34.71 with HTTP; Tue, 10 Apr 2012 08:27:35 -0700 (PDT) In-Reply-To: <9511.1334071505@sss.pgh.pa.us> 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> From: Dave Cramer Date: Tue, 10 Apr 2012 11:27:35 -0400 X-Google-Sender-Auth: e2c4lczIyHSZXx8djevjavfDvOw Message-ID: Subject: Re: [JDBC] Regarding GSoc Application To: Tom Lane Cc: Merlin Moncure , Andrew Dunstan , Atri Sharma , Pg Hackers , pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201204/473 X-Sequence-Number: 206276 On Tue, Apr 10, 2012 at 11:25 AM, Tom Lane wrote: > Merlin Moncure writes: >> ... =A0We have to invoke java and there >> are two basic ways to tie into the java runtime: =A0one is to jump >> through SPI via the SQL executor. The other is JNI into the pl/java >> jvm which I think you were hinting was the better approach. > > Hm? =A0SPI doesn't know anything about Java either. > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0regards, tom lane Having pl/java as a dependancy here makes this a very complex "feature" to setup. The potential benefits are quite minimal since almost any decent ETL tool can handle multiple data sources Dave From atri.jiit@gmail.com Tue Apr 10 15:28:40 2012 Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 2E89D189E83A; Tue, 10 Apr 2012 12:28:40 -0300 (ADT) Received: from mail-vb0-f46.google.com ([209.85.212.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHczl-0005nP-HE; Tue, 10 Apr 2012 15:28:39 +0000 Received: by vbbff1 with SMTP id ff1so3082773vbb.19 for ; Tue, 10 Apr 2012 08:28:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=LQ811HbyJy4diSEPt1UCNUTaGJ0I7WBsuRNmTZGB3uY=; b=msnOezW6V74LXEwQhu3UIxBY3oGqwGFD+9ejwFoXXyOyw3zjlhAZDVOZycRwh232Sq yeuu16czA/Dm3eVLgnG/PYaoX4lqeud0U/BXi80iIASV3NQeN+1jkEtNDcXB8Vte7tC4 MEEw0SObqnsqgkwxG9GQwzvY3/0dJAdNKDPDYkwIUVNPde3P4H1nPSzvxJTotgeQwmuF IgJ6qpuDmuqtckDfW7K3f6kLB3yEChvfxpELZvotAF8fjlKG1A7wvAFfNZkso8GjbK54 7EDSQ6imsTZOVngmfb3cirAuhpmuzs8OAozFmNzGETxEQfm37zLs0JDTH8328Uq4etQV 5nUw== MIME-Version: 1.0 Received: by 10.52.23.10 with SMTP id i10mr4877637vdf.24.1334071703876; Tue, 10 Apr 2012 08:28:23 -0700 (PDT) Received: by 10.52.68.83 with HTTP; Tue, 10 Apr 2012 08:28:23 -0700 (PDT) In-Reply-To: <9511.1334071505@sss.pgh.pa.us> 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> Date: Tue, 10 Apr 2012 20:58:23 +0530 Message-ID: Subject: Re: [JDBC] Regarding GSoc Application From: Atri Sharma To: Tom Lane Cc: Merlin Moncure , Andrew Dunstan , Dave Cramer , Pg Hackers , pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201204/474 X-Sequence-Number: 206277 On Tue, Apr 10, 2012 at 8:55 PM, Tom Lane wrote: > Merlin Moncure writes: >> ... =A0We have to invoke java and there >> are two basic ways to tie into the java runtime: =A0one is to jump >> through SPI via the SQL executor. The other is JNI into the pl/java >> jvm which I think you were hinting was the better approach. > > Hm? =A0SPI doesn't know anything about Java either. > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0regards, tom lane Hi Tom, We plan to call SQL through SPI from the FDW,which in turn would call the Pl/Java routine. We are working on the JNI Invocation API approach also.We will be currently researching the differences between the two approaches(SPI and JNI). Atri --=20 Regards, Atri l'apprenant From tgl@sss.pgh.pa.us Tue Apr 10 15:36:53 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id E6BE8189E83A; Tue, 10 Apr 2012 12:36:53 -0300 (ADT) Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHd7l-0001qH-7e; Tue, 10 Apr 2012 15:36:53 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id q3AFacp2009746; Tue, 10 Apr 2012 11:36:38 -0400 (EDT) To: Atri Sharma cc: Merlin Moncure , Andrew Dunstan , Dave Cramer , Pg Hackers , pgsql-jdbc@postgresql.org Subject: Re: [JDBC] Regarding GSoc Application In-reply-to: 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> Comments: In-reply-to Atri Sharma message dated "Tue, 10 Apr 2012 20:58:23 +0530" Date: Tue, 10 Apr 2012 11:36:38 -0400 Message-ID: <9745.1334072198@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201204/477 X-Sequence-Number: 206280 Atri Sharma writes: > On Tue, Apr 10, 2012 at 8:55 PM, Tom Lane wrote: >> Hm? SPI doesn't know anything about Java either. > We plan to call SQL through SPI from the FDW,which in turn would call > the Pl/Java routine. If you're saying that every Java function that the FDW needs would have to be exposed as a SQL function, that seems like a pretty high-risk (not to mention low performance) approach. Not only do you have to design a SQL representation for every datatype you need, but you have to be sure that you do not have any security holes arising from unscrupulous users calling those SQL functions manually with arguments of their choosing. regards, tom lane From andrew@dunslane.net Tue Apr 10 15:56:17 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id DBFB7189E83A; Tue, 10 Apr 2012 12:56:17 -0300 (ADT) Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHdQW-0002Bl-0G; Tue, 10 Apr 2012 15:56:17 +0000 X-Originating-IP: 217.70.178.138 Received: from mfilter9-d.gandi.net (mfilter9-d.gandi.net [217.70.178.138]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id AEEDB17207E; Tue, 10 Apr 2012 17:55:51 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter9-d.gandi.net Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by mfilter9-d.gandi.net (mfilter9-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 6YQfzMAKdAe7; Tue, 10 Apr 2012 17:55:50 +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 F019B17209C; Tue, 10 Apr 2012 17:55:48 +0200 (CEST) Message-ID: <4F845803.8090908@dunslane.net> Date: Tue, 10 Apr 2012 11:55:47 -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: Tom Lane CC: Atri Sharma , Merlin Moncure , 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> <4F84480F.1020905@dunslane.net> <9511.1334071505@sss.pgh.pa.us> <9745.1334072198@sss.pgh.pa.us> In-Reply-To: <9745.1334072198@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201204/482 X-Sequence-Number: 206285 On 04/10/2012 11:36 AM, Tom Lane wrote: > Atri Sharma writes: >> On Tue, Apr 10, 2012 at 8:55 PM, Tom Lane wrote: >>> Hm? SPI doesn't know anything about Java either. >> We plan to call SQL through SPI from the FDW,which in turn would call >> the Pl/Java routine. > If you're saying that every Java function that the FDW needs would have > to be exposed as a SQL function, that seems like a pretty high-risk > (not to mention low performance) approach. Not only do you have to > design a SQL representation for every datatype you need, but you have to > be sure that you do not have any security holes arising from > unscrupulous users calling those SQL functions manually with arguments > of their choosing. > > Yeah. I think this design is horribly baroque and unnecessary. SPI is for talking SQL. It's completely in the way of a straight-forward implementation of this feature IMNSHO. cheers andrew From mmoncure@gmail.com Tue Apr 10 16:07:39 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 231C9189E83A; Tue, 10 Apr 2012 13:07:39 -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 1SHdbW-0002O5-0b; Tue, 10 Apr 2012 16:07:38 +0000 Received: by dadz9 with SMTP id z9so8242278dad.33 for ; Tue, 10 Apr 2012 09:07:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=WxlXPPLWGEQ5hg61frD5ZFMFmdfVF6rFbDBxciHjyTQ=; b=hntcbidVOKvR+uOCdPeOIJ6kyW19RMLimShLSFXCisgppGHbBa7pn43AbMjCMA9s2A 7eNJO+xI1TnQbCcB6mrReag0e0rt2TP62v7IzPSMaPgtqWtPYHRuQgG7eZhPpz0YTzJ/ 30eQoCyYkGhAegZRcqofmPT9JNra48MM7XyFtlNLDX9COg4aMdo3KYdWPwWKUs68faEu h+y/yODDpol26pz+Q4px5LTxy+AxH/+kpsb/mxK04ZpIxIbjYNdhkl13OS2yrlT0q1qZ 0T1jMFpBUL4BHg4s3xTovGaUgaimSaQZUEt8j4uhY3puWFIMvFtwNXXinb77e5L6xAmW SGow== MIME-Version: 1.0 Received: by 10.68.220.2 with SMTP id ps2mr30167021pbc.109.1334074044889; Tue, 10 Apr 2012 09:07:24 -0700 (PDT) Received: by 10.142.202.6 with HTTP; Tue, 10 Apr 2012 09:07:24 -0700 (PDT) In-Reply-To: <9745.1334072198@sss.pgh.pa.us> 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> Date: Tue, 10 Apr 2012 11:07:24 -0500 Message-ID: Subject: Re: [JDBC] Regarding GSoc Application From: Merlin Moncure To: Tom Lane Cc: Atri Sharma , Andrew Dunstan , Dave Cramer , Pg Hackers , pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201204/484 X-Sequence-Number: 206287 On Tue, Apr 10, 2012 at 10:36 AM, Tom Lane wrote: > Atri Sharma writes: >> On Tue, Apr 10, 2012 at 8:55 PM, Tom Lane wrote: >>> Hm? =A0SPI doesn't know anything about Java either. > >> We plan to call SQL through SPI from the FDW,which in turn would call >> the Pl/Java routine. > > If you're saying that every Java function that the FDW needs would have > to be exposed as a SQL function, that seems like a pretty high-risk > (not to mention low performance) approach. =A0Not only do you have to > design a SQL representation for every datatype you need, but you have to > be sure that you do not have any security holes arising from > unscrupulous users calling those SQL functions manually with arguments > of their choosing. Hm, well, for data type representation, an 'all text' representation would avoid that requirement (although could certainly add it back in later for performance reasons). That's not all that different from what the other fdw projects are doing -- mostly wrapping BuildTupleFromCStrings and such. But totally agree that for top performance you'd need direct native transfer. I'm in the 'perfect is the enemy of the good' mindset here. I think the security argument is mostly bogus -- pl/java is already well into the untrusted side of things and I was figuring being able to bypass the fdw layer and invoke the functions dblink style was a feature, not a bug. But adding up all the comments I see healthy skepticism that running through SPI is the proper approach and it is noted. So the way forward is a more direct hook to the jvm or to go back to the drawing board I suppose. I agree that JNI isn't required -- we're going to have to study the pl/java system a bit to determine the best way to hook in. This could end up getting us into the 'biting of more than can chew' territory admittedly, but Atri is enthusiastic and wants to give it a go. Additionally, Dave is skeptical that pl/java dependency is a good foundation for a generally useful library. I'm not buying that -- pl/java is the 'best of class' for implementing java inside the database that I'm aware of. I see absolutely no reason why it couldn't be packaged as an extension -- the project is a bit dusty and needs some TLC but does what it does very well. I also respectfully disagree that the presence of high quality ETL engines eliminate the usefulness of a direct database to database transfer mechanism. I personally never go the ETL route when I can just dblink the data across and do the massaging in SQL. Other developers may think differently of course. Of course, if there was a good way to implement jdbc/fdw without using pl/java that would be good to know. merlin From mmoncure@gmail.com Tue Apr 10 21:04:26 2012 Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id CE7C9189E83A; Tue, 10 Apr 2012 18:04:26 -0300 (ADT) Received: from mail-pz0-f46.google.com ([209.85.210.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHiEh-0004zi-UH; Tue, 10 Apr 2012 21:04:25 +0000 Received: by dadz9 with SMTP id z9so276526dad.33 for ; Tue, 10 Apr 2012 14:04:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=dmoBpmO4/eqvWZoqyJWAMPighl9aj9F5Wo3//ioyj4k=; b=Ag8bMQnFe7Ec+MVEkSUwQVy3pFSpHmPy9+YYgFuFcGARuey3PNAIjLoxSrp+AVM1kh GyXGcl+LYEvyUA/WG/9ZC0zhFY4NC4BTUL+qPUWC6uOaFCPuZkhF3W++Jk3nSLGEeQHX UzyjcAE2aXCgn1byb9u4zaiY9LdeJprMPlx2O6CRm0OSk6bH96T6vNsLiQKWpGcXTlOS Tp6GvJP3opaLJ6QfvQuUrsAXCNKIBGelYIQ+CQ7AuySGmHalwggFWSaohJGWN/fqpTYk 4ATknA6zhEy3UBRo6cauaIxYj5IvZPW9q2lfVcnxgyn1IHkZLXIFnPad2YYoMGe1TN6W iENw== MIME-Version: 1.0 Received: by 10.68.134.8 with SMTP id pg8mr15208979pbb.152.1334091849799; Tue, 10 Apr 2012 14:04:09 -0700 (PDT) Received: by 10.142.202.6 with HTTP; Tue, 10 Apr 2012 14:04:09 -0700 (PDT) In-Reply-To: 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> Date: Tue, 10 Apr 2012 16:04:09 -0500 Message-ID: Subject: Re: [JDBC] Regarding GSoc Application From: Merlin Moncure To: Tom Lane Cc: Atri Sharma , Andrew Dunstan , Dave Cramer , Pg Hackers , pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201204/520 X-Sequence-Number: 206323 On Tue, Apr 10, 2012 at 11:07 AM, Merlin Moncure wrote= : > =A0I agree that JNI isn't required -- we're going to > have to study the pl/java system a bit to determine the best way to > hook in. =A0This could end up getting us into the 'biting of more than > can chew' territory admittedly, but Atri is enthusiastic and wants to > give it a go. Well. maybe I spoke too soon...JNI is probably the best route. Since SPI is off the table, all we're really pulling in from pl/java is the (non-trivial) proper installation of a jvm into a postgres process. pl/java is essentially a wrapper to JNI that does postgres to jni type conversion and builds a database driven class lookup system that allows building the java environment inside the database. That part is not needed at all; since we're not going to install our routines as pl/java installed they will be installed into a separate and more typical class path from a jvm point of view. There are no exposed routines in pljava.so that allow for easy manual invocation of a java routine -- it's all pretty much hardwired to the language function call handler system. This begs the question about why pl/java should be used at all. Well, as I said the jvm insertion into postgres is non-trivial so that alone is worth something. Maybe though we should just rip out the jvm guts that we really need (mostly some parts of backend.c and some of the type files) and do a completely standalone jni wrapper. pl/java's build system is a mess anyways so we're not losing all that much in trying to go off on our own and do something. OTOH, throwing a build system on top of the growing pile of things to do is turning this into a daunting project vs the (admittedly cobbled together) approach I was hoping to do earlier. Anyways, it's really Atri's call if he's comfortable proceeding. merlin From atri.jiit@gmail.com Wed Apr 11 03:41:37 2012 Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id B5976EB1554; Wed, 11 Apr 2012 00:41:37 -0300 (ADT) Received: from mail-pb0-f46.google.com ([209.85.160.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHoR4-0004xD-Oj; Wed, 11 Apr 2012 03:41:36 +0000 Received: by pbcun15 with SMTP id un15so709208pbc.19 for ; Tue, 10 Apr 2012 20:41:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-type:content-transfer-encoding:x-mailer :thread-index:content-language; bh=mdC05+HEa7yd9a+kdDJkmjFUU1o92qI8eSEYo6GNZv0=; b=ma52eLRy8FwBp9foYIzsVgwlj/a01qEUKZSh8O00TvDKB+Vcdgpcv5+wzxL+XM8sDe 5RENS3/ZtNvw3wbX3dnZvfgjwSDM/HHxG0mMdVE/8Z6lUXtOD6KlSvZMAyCYMc71Rw0H k3M4aIJ7zmEpnwia69AnDarGvraHYeisOjLM266rsEzkudKaTRM27Lz8uBNCKaq4RkEA 3iO6b2Z9snmYhiHLvZvM44PUuIor6na50JmoOFF0Gs1nSncT9GhHHpvEsUKQK3Ls+/wa Q6roCcLLxyX2sfVtriNdXpeC594e0ZIY/gCmW6ANe12+/kDjdwN87siE5yhl7oaigU+l M43w== Received: by 10.68.201.98 with SMTP id jz2mr34256953pbc.97.1334115680837; Tue, 10 Apr 2012 20:41:20 -0700 (PDT) Received: from GITCPC ([122.177.230.99]) by mx.google.com with ESMTPS id a9sm1636734pbr.73.2012.04.10.20.41.16 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 10 Apr 2012 20:41:19 -0700 (PDT) From: "Atri Sharma" To: "'Merlin Moncure'" , "'Tom Lane'" Cc: "'Andrew Dunstan'" , "'Dave Cramer'" , "'Pg Hackers'" , 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 09:11:10 +0530 Message-ID: <4f84fd5f.a93b440a.2eed.42c4@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: Ac0XXXlqMG1JO8yKTH2UKrhOuA0UPwAMrFJg Content-Language: en-in X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201204/564 X-Sequence-Number: 206367 >> I agree that JNI isn't required -- we're going to >> have to study the pl/java system a bit to determine the best way to >> hook in. This could end up getting us into the 'biting of more than >> can chew' territory admittedly, but Atri is enthusiastic and wants to >> give it a go. > >Well. maybe I spoke too soon...JNI is probably the best route. Since >SPI is off the table, all we're really pulling in from pl/java is the >(non-trivial) proper installation of a jvm into a postgres process. >pl/java is essentially a wrapper to JNI that does postgres to jni type >conversion and builds a database driven class lookup system that >allows building the java environment inside the database. That part >is not needed at all; since we're not going to install our routines as >pl/java installed they will be installed into a separate and more >typical class path from a jvm point of view. There are no exposed >routines in pljava.so that allow for easy manual invocation of a java >routine -- it's all pretty much hardwired to the language function >call handler system. > >This begs the question about why pl/java should be used at all. Well, >as I said the jvm insertion into postgres is non-trivial so that alone >is worth something. Maybe though we should just rip out the jvm guts >that we really need (mostly some parts of backend.c and some of the >type files) and do a completely standalone jni wrapper. pl/java's >build system is a mess anyways so we're not losing all that much in >trying to go off on our own and do something. OTOH, throwing a build >system on top of the growing pile of things to do is turning this into >a daunting project vs the (admittedly cobbled together) approach I was >hoping to do earlier. Anyways, it's really Atri's call if he's >comfortable proceeding. Hi All, 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. I think we can proceed with this.Once we are done with the API calling Java functions,I think the rest of the path is easily mapped(writing Java functions to connect to JDBC). Please let me know your opinions on this. Atri From pierce@hogranch.com Wed Apr 11 04:30:24 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id BB1A54B856B for ; Wed, 11 Apr 2012 01:30:24 -0300 (ADT) Received: from hogranch.com ([75.101.82.47]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHpCJ-0007Q6-2N for pgsql-jdbc@postgresql.org; Wed, 11 Apr 2012 04:30:24 +0000 Received: from [127.0.0.1] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id q3B4U3907050 for ; Tue, 10 Apr 2012 21:30:03 -0700 Message-ID: <4F8508C6.5090305@hogranch.com> Date: Tue, 10 Apr 2012 21:29:58 -0700 From: John R Pierce User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: [HACKERS] Regarding GSoc Application 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> <4f84fd5f.a93b440a.2eed.42c4@mx.google.com> In-Reply-To: <4f84fd5f.a93b440a.2eed.42c4@mx.google.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201204/55 X-Sequence-Number: 22855 On 04/10/12 8:41 PM, Atri Sharma wrote: > 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. PL/Java also provides for passing SQL arguments in various data types to/from your java code. not usinig pl/java would mean you'd have to reinvent all those wheels, they exist now in a standard mannner, why not use them? as I see it, your proposal could be implemented as a set of pljava functions callable from SQL that would in turn invoke JDBC to connect to and fetch data from your foreign database, then return it to the calling SQL procedure, much as dblink does now for pg to pg database links. -- john r pierce N 37, W 122 santa cruz ca mid-left coast From atri.jiit@gmail.com Wed Apr 11 04:37:05 2012 Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 256D14B856B for ; Wed, 11 Apr 2012 01:37:05 -0300 (ADT) Received: from mail-pb0-f46.google.com ([209.85.160.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHpIk-0005qH-Bz for pgsql-jdbc@postgresql.org; Wed, 11 Apr 2012 04:37:04 +0000 Received: by pbcun15 with SMTP id un15so750018pbc.19 for ; Tue, 10 Apr 2012 21:36:48 -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=2lzuCxd2n4wjh6u1EXF6k526xRr0sar2nSybbLByOwA=; b=WE/KXikziKW6W1rjgSzjTzBmdj/7LdXedh5Ki6sDg54SzmzgjX9Bs+aETuIsq+hJz/ iBFi/ql0XFhJzujMCq03I/oPvx7mkv1Tk7VTT/Z94co37h+E2gWbDHUn4YBOkopo/Z06 D2wD1c0yJH7EMJqqtkiEBeUmJNGJdVH0gna7RlK3oLgGi7FFmTk7Fq2e0FuJGfJD3mfb U/WjgABJOREGHIcVEcbmf/kRJGjI6r427KZcIoml21nW92a6+ag7Fd61rFC6GGJhJkhI oNYjmeIxh2g0iPted/gfSP08RhMX2ks0wZfvxMTCtYOfeVU/kzWQVJa0T75URbe4SaaQ oDpA== Received: by 10.68.197.41 with SMTP id ir9mr5734269pbc.83.1334119008497; Tue, 10 Apr 2012 21:36:48 -0700 (PDT) Received: from GITCPC ([122.177.230.99]) by mx.google.com with ESMTPS id q5sm1771477pbp.28.2012.04.10.21.36.45 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 10 Apr 2012 21:36:47 -0700 (PDT) From: "Atri Sharma" To: "'John R Pierce'" , 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> <4f84fd5f.a93b440a.2eed.42c4@mx.google.com> <4F8508C6.5090305@hogran ch.com> In-Reply-To: <4F8508C6.5090305@hogranch.com> Subject: Re: [HACKERS] Regarding GSoc Application Date: Wed, 11 Apr 2012 10:06:40 +0530 Message-ID: <4f850a5f.4537440a.3ae2.4930@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: Ac0Xm9VTuxaJvhMcRyeKioJU1FNUPQAAIaPw Content-Language: en-in X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201204/56 X-Sequence-Number: 22856 Hi John, Yes,I agree,that can be done,but we had an extensive discussion on it yesterday and Andrew and Tom believe that would pose serious security issues as any malicious user can change the arguments sent to the SQL and cause problems. Atri -----Original Message----- From: pgsql-jdbc-owner@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of John R Pierce Sent: 11 April 2012 10:00 To: pgsql-jdbc@postgresql.org Subject: Re: [HACKERS] [JDBC] Regarding GSoc Application On 04/10/12 8:41 PM, Atri Sharma wrote: > 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. PL/Java also provides for passing SQL arguments in various data types to/from your java code. not usinig pl/java would mean you'd have to reinvent all those wheels, they exist now in a standard mannner, why not use them? as I see it, your proposal could be implemented as a set of pljava functions callable from SQL that would in turn invoke JDBC to connect to and fetch data from your foreign database, then return it to the calling SQL procedure, much as dblink does now for pg to pg database links. From pierce@hogranch.com Wed Apr 11 05:36:27 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 92B9B4B856B for ; Wed, 11 Apr 2012 02:36:27 -0300 (ADT) Received: from hogranch.com ([75.101.82.47]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHqEE-0008RL-6j for pgsql-jdbc@postgresql.org; Wed, 11 Apr 2012 05:36:27 +0000 Received: from [127.0.0.1] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id q3B5a4907402 for ; Tue, 10 Apr 2012 22:36:04 -0700 Message-ID: <4F85183F.6070806@hogranch.com> Date: Tue, 10 Apr 2012 22:35:59 -0700 From: John R Pierce User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: [HACKERS] Regarding GSoc Application 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> <4f84fd5f.a93b440a.2eed.42c4@mx.google.com> <4 F8508C6.5090305@hogran ch.com> <4f850a5f.4537440a.3ae2.4930@mx.goog! le.com> In-Reply-To: <4f850a5f.4537440a.3ae2.4930@mx.google.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201204/57 X-Sequence-Number: 22857 On 04/10/12 9:36 PM, Atri Sharma wrote: > Hi John, > > Yes,I agree,that can be done,but we had an extensive discussion on it > yesterday and Andrew and Tom believe that would pose serious security issues > as any malicious user can change the arguments sent to the SQL and cause > problems. > I'm not sure what "change the arguments sent to SQL" means. A malicious user with sufficient privileges can do all sorts of damage, and there's not much much you can do about it short of not letting malicious users have privileges. your foreign data wrapper code should probably require that the user who creates a FDW connection to an external database have adequate permissions. the foreign database servr already has its own authentication hoops tha this FDW user will have to provide. -- john r pierce N 37, W 122 santa cruz ca mid-left coast From atri.jiit@gmail.com Wed Apr 11 05:44:38 2012 Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 5F88E4B856B for ; Wed, 11 Apr 2012 02:44:38 -0300 (ADT) Received: from mail-pz0-f46.google.com ([209.85.210.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHqM6-0006rM-Ej for pgsql-jdbc@postgresql.org; Wed, 11 Apr 2012 05:44:37 +0000 Received: by dadz9 with SMTP id z9so791903dad.33 for ; Tue, 10 Apr 2012 22:44:20 -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=kbHbybmq3DKmRZTAQV0WYF+l/GkPwDKnSnVJxhjYXvg=; b=ZiiMgClos2ran7Uwe5TpD+1CRkm8akusMB2f3f7lFdNoAxtWzyaU2UIPwxeIYkAhC6 nIKdDwLqtoeDE9cYBsn3wZqSKKBo5lYv1v4d+GgP1v3749dEoOPqBPQF0XM4tBmzCNE4 Otz/BHK+IClfrfxt7Fs4j95qIWFa3NNN0GYJLzM+vhWpqk0Q2G7xQ31gMYji3faRt1aP RsRQTO0IP1kx2fjqR05ye8DFSb3bIRtvA612DBxl6B33V2a5LfFG0RLwrSK/nkrxXARo ERZGzPYaL5Z0gJXDY6llJPlpLyxtpu5uoYEy9lD7p/8ArJPKxuzBzdwAQIo6tzz/cmxI si7g== Received: by 10.68.223.234 with SMTP id qx10mr34715979pbc.154.1334123060862; Tue, 10 Apr 2012 22:44:20 -0700 (PDT) Received: from GITCPC ([122.177.230.99]) by mx.google.com with ESMTPS id u5sm1899139pbu.76.2012.04.10.22.44.18 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 10 Apr 2012 22:44:20 -0700 (PDT) From: "Atri Sharma" To: "'John R Pierce'" , 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> <4f84fd5f.a93b440a.2eed.42c4@mx.google.com> <4 F8508C6.5090305@hogran ch.com> <4f850a5f.4537440a.3ae2.4930@mx.goog! le.com> <4F85183F.607 0806@hogranch.com> In-Reply-To: <4F85183F.6070806@hogranch.com> Subject: Re: [HACKERS] Regarding GSoc Application Date: Wed, 11 Apr 2012 11:14:13 +0530 Message-ID: <4f851a34.c505440a.4905.4f24@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: Ac0XpRAN4A5ePn0tQfWknTneTKTMzwAAHZqw Content-Language: en-in X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201204/58 X-Sequence-Number: 22858 >I'm not sure what "change the arguments sent to SQL" means. A >malicious user with sufficient privileges can do all sorts of damage, >and there's not much much you can do about it short of not letting >malicious users have privileges. > >your foreign data wrapper code should probably require that the user who >creates a FDW connection to an external database have adequate >permissions. the foreign database servr already has its own >authentication hoops tha this FDW user will have to provide. Hi John, Please find the reply from Tom on the idea of SQL-Pl/Java calls: This was what I wrote: > We plan to call SQL through SPI from the FDW,which in turn would call > the Pl/Java routine. This was what Tom replied: ******* If you're saying that every Java function that the FDW needs would have to be exposed as a SQL function, that seems like a pretty high-risk (not to mention low performance) approach. Not only do you have to design a SQL representation for every datatype you need, but you have to be sure that you do not have any security holes arising from unscrupulous users calling those SQL functions manually with arguments of their choosing. ************ Please let me know your opinion on this. Atri From pierce@hogranch.com Wed Apr 11 06:02:22 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 769B54B856B for ; Wed, 11 Apr 2012 03:02:22 -0300 (ADT) Received: from hogranch.com ([75.101.82.47]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHqdJ-0000MW-OR for pgsql-jdbc@postgresql.org; Wed, 11 Apr 2012 06:02:22 +0000 Received: from [127.0.0.1] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id q3B624907576 for ; Tue, 10 Apr 2012 23:02:04 -0700 Message-ID: <4F851E57.5060802@hogranch.com> Date: Tue, 10 Apr 2012 23:01:59 -0700 From: John R Pierce User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: [HACKERS] Regarding GSoc Application 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> <4f84fd5f.a93b440a.2eed.42c4@mx.google.com> <4 F8508C6.5090305@hogran ch.com> <4f850a5f.4537440a.3ae2.4930@mx.goog! le.com> <4F85183F.607 0806@hogranch.com> <4f851a34.c505440a.4905.4f24@mx.google.com> In-Reply-To: <4f851a34.c505440a.4905.4f24@mx.google.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201204/59 X-Sequence-Number: 22859 On 04/10/12 10:44 PM, Atri Sharma wrote: > We plan to call SQL through SPI from the FDW,which in turn would call > > the Pl/Java routine. that seems overly complex. SPI is an internal mechanism used by C functions that are called from SQL why not just implement it as.... user application -> SQL -> PLjava FDW functions -> pljava code -> JDBC -> foreign database (and of course, back to return the data from said foreign database) this would look to the user very much like dblink looks now, and have similar security issues and mitigations. -- john r pierce N 37, W 122 santa cruz ca mid-left coast From atri.jiit@gmail.com Wed Apr 11 06:09:52 2012 Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 4CD87F7657 for ; Wed, 11 Apr 2012 03:09:52 -0300 (ADT) Received: from mail-pb0-f46.google.com ([209.85.160.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHqkW-0007MY-J8 for pgsql-jdbc@postgresql.org; Wed, 11 Apr 2012 06:09:51 +0000 Received: by pbcun15 with SMTP id un15so822901pbc.19 for ; Tue, 10 Apr 2012 23:09:34 -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=x/qPvjMnOo3BPbgV3f/+k+ulm2TX42OHU7qHJXHI1Ro=; b=OaqdkzMaFWkdMuXalW72S69x0jhTKQoBH05INKJmQa8VzirG2Q0kJQ8j8uAMKdYJCI xBUvN5qpfmkgQBt6eSjaMP2fetr5aKa4Y52gwPdGAfUcDVySFX1fC7kNifNfqOGwTEaw 7SO3eWKMBP8xdeUM6qvfsZdyJyroQW4b5JpoVGFr0yOuUQtS84SEruNNFFGDxoZoD46b q+OAtZHmi1buTfmPrxBZEVy7CbDAdmLU9RfOX9/Kq8u7icKC+9i16sQ9D/DP9ubDJ7+P rbAXQqSeSY8JfvXwI8b/JqOv/a5HIF8/x3R64dKyHi9F8M1eLKxoKrThnnOItK8Ag1KZ pzZg== Received: by 10.68.225.169 with SMTP id rl9mr19096105pbc.122.1334124574891; Tue, 10 Apr 2012 23:09:34 -0700 (PDT) Received: from GITCPC ([122.177.230.99]) by mx.google.com with ESMTPS id r6sm1973758pbl.24.2012.04.10.23.09.32 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 10 Apr 2012 23:09:34 -0700 (PDT) From: "Atri Sharma" To: "'John R Pierce'" , 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> <4f84fd5f.a93b440a.2eed.42c4@mx.google.com> <4 F8508C6.5090305@hogran ch.com> <4f850a5f.4537440a.3ae2.4930@mx.goog! le.com> <4F85183F.607 0806@hogranch.com> <4f851a34.c505440a.4905.4f24@mx.google.com> <4F851E57.5060802@hogranch.com> In-Reply-To: <4F851E57.5060802@hogranch.com> Subject: Re: [HACKERS] Regarding GSoc Application Date: Wed, 11 Apr 2012 11:39:27 +0530 Message-ID: <4f85201e.e62a440a.3399.5b3f@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: Ac0XqK+AdnMfnmUDS0esQpAoIc9I4wAAGYUg Content-Language: en-in X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201204/60 X-Sequence-Number: 22860 > >that seems overly complex. SPI is an internal mechanism used by C >functions that are called from SQL > >why not just implement it as.... > >user application -> SQL -> PLjava FDW functions -> pljava code -> JDBC >-> foreign database > >(and of course, back to return the data from said foreign database) > Hi John, Hmm.That sounds good,but where does the FDW come in?Will the user application interact with the FDW,and FDW handle the SQL calls and everything else from there i.e. FDW wraps the entire process,right? Also,will it solve Tom's concern? Atri From umi.tanuki@gmail.com Wed Apr 11 06:18:58 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 8628BF7658; Wed, 11 Apr 2012 03:18:58 -0300 (ADT) Received: from mail-qa0-f53.google.com ([209.85.216.53]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHqtN-0000eL-5D; Wed, 11 Apr 2012 06:18:58 +0000 Received: by qadc11 with SMTP id c11so512067qad.19 for ; Tue, 10 Apr 2012 23:18:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=5L/mpNwC5wKrq0TV7n/m+0rGpl+DWognuQ6yTnSCyVU=; b=SP9tZrS/odlrcL/p/DyMOdtg9YsZLCkSKMCFs0YF6RJeXq6KV88eLEdK2XNZ4Epyl4 8mfwnV8BglhEnhgochV8IqgTkUAM6R024phLPwNCgFEa0nPdr685EquWpHVniCds2pzS M3QIOv701xMxxPiIyFnIPfbPaeOc0Nkqa2sSS9ME+DCfGzXyRWptERkYPgdEUoEGxTMD fFZ2EbzeKRXbQ/vzfMZ/qT9Kjg0eqFUdsrYo8Hj/UBODvLuibZS3orsSkXwpWlJu4Ak4 ltfzRDGn7Oj8dQApvIN4FJK67tHfe/vSA8ZQ+XCye55OVKl6j2hexsIjd5XI9Or07J/Y +b7w== MIME-Version: 1.0 Received: by 10.229.136.130 with SMTP id r2mr5457381qct.58.1334125124289; Tue, 10 Apr 2012 23:18:44 -0700 (PDT) Received: by 10.229.182.77 with HTTP; Tue, 10 Apr 2012 23:18:44 -0700 (PDT) In-Reply-To: <4f84fd5f.a93b440a.2eed.42c4@mx.google.com> 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> <4f84fd5f.a93b440a.2eed.42c4@mx.google.com> Date: Tue, 10 Apr 2012 23:18:44 -0700 Message-ID: Subject: Re: [JDBC] Regarding GSoc Application From: Hitoshi Harada To: Atri Sharma Cc: Merlin Moncure , Tom Lane , Andrew Dunstan , Dave Cramer , Pg Hackers , pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201204/565 X-Sequence-Number: 206368 On Tue, Apr 10, 2012 at 8:41 PM, Atri Sharma wrote: > Hi All, > > 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. > > I think we can proceed with this.Once we are done with the API calling Java > functions,I think the rest of the path is easily mapped(writing Java > functions to connect to JDBC). > > Please let me know your opinions on this. > I think Multicorn is a good example, which invokes Python from FDW routines though it is not using PL/Python. http://multicorn.org/ Thanks, -- Hitoshi Harada From pierce@hogranch.com Wed Apr 11 06:21:35 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 45DA2F7658 for ; Wed, 11 Apr 2012 03:21:35 -0300 (ADT) Received: from hogranch.com ([75.101.82.47]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHqvu-0000jP-DM for pgsql-jdbc@postgresql.org; Wed, 11 Apr 2012 06:21:34 +0000 Received: from [127.0.0.1] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id q3B6LC907715 for ; Tue, 10 Apr 2012 23:21:12 -0700 Message-ID: <4F8522D3.9060806@hogranch.com> Date: Tue, 10 Apr 2012 23:21:07 -0700 From: John R Pierce User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: [HACKERS] Regarding GSoc Application References: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> <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> <4f84fd5f.a93b440a.2eed.42c4@mx.google.com> <4 F8508C6.5090305@hogran ch.com> <4f850a5f.4537440a.3ae2.4930@mx.goog! le.com> <4F85183F.607 0806@hogranch.com> <4f851a34.c505440a.4905.4f24@mx.google.com> <4F851E57.5060802@hogranch.com> <4f85201e.e62a440a.3399.5b3f@mx.google.com> In-Reply-To: <4f85201e.e62a440a.3399.5b3f@mx.google.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201204/62 X-Sequence-Number: 22862 On 04/10/12 11:09 PM, Atri Sharma wrote: >> why not just implement it as.... >> > >> >user application -> SQL -> PLjava FDW functions -> pljava code -> JDBC >> >-> foreign database >> > >> >(and of course, back to return the data from said foreign database) >> > > Hi John, > > Hmm.That sounds good,but where does the FDW come in?Will the user > application interact with the FDW,and FDW handle the SQL calls and > everything else from there i.e. FDW wraps the entire process,right? see dblink ofr an example API http://www.postgresql.org/docs/current/static/dblink.html the 'pljava fdw functions' are the publicly visible pljava functions implementing your api... while my 'pljava code' are additional functions/methods you use internally that aren't visible externally -- john r pierce N 37, W 122 santa cruz ca mid-left coast From atri.jiit@gmail.com Wed Apr 11 06:23:02 2012 Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 023BFF7658; Wed, 11 Apr 2012 03:23:02 -0300 (ADT) Received: from mail-pz0-f46.google.com ([209.85.210.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHqxH-0007dx-FC; Wed, 11 Apr 2012 06:23:01 +0000 Received: by dadz9 with SMTP id z9so839801dad.33 for ; Tue, 10 Apr 2012 23:22:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-type:content-transfer-encoding:x-mailer :thread-index:content-language; bh=6gaSgO0qHRRU8Sl+swsT4ENaO9PN8JLPyRhX9MgLfJ4=; b=V9I1+X8fAfpnA9ESpf4SXGOgJyialVyW18ySL9YDnhFScWaSO/jQVhkOk+AdovW3Iw x8q77otj5g3CBvkoG0C6H5wp/RxOHVR24DsV1CBhorDGo81Z6FZ9H5LdAVX1ZwwjqEQ2 UK4eMhpADwc32oJhrVKOcYYDZCnHcI4zBlBHiUlwXs3TGzdOERgryqnUop3Ra1fZa77C c9+OeFtGApllXn9bJtB5UAD3eL+uN5CZenA5GwFnGm9noRETBPNICE7cIi+YL7WY6sle eC6DiqGJOmid031xZAJ4hSDO89WMsjY11EbK9l+yzjOovSs8H6BxL8/o8ezVmZtBOpBj qriw== Received: by 10.68.202.168 with SMTP id kj8mr34861578pbc.86.1334125365672; Tue, 10 Apr 2012 23:22:45 -0700 (PDT) Received: from GITCPC ([122.177.230.99]) by mx.google.com with ESMTPS id x1sm1992170pbp.50.2012.04.10.23.22.41 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 10 Apr 2012 23:22:44 -0700 (PDT) From: "Atri Sharma" To: "'Hitoshi Harada'" Cc: "'Merlin Moncure'" , "'Tom Lane'" , "'Andrew Dunstan'" , "'Dave Cramer'" , "'Pg Hackers'" , 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> < 4f84fd5f.a93b440a.2eed.42c4@mx.google.com> In-Reply-To: Subject: Re: [JDBC] Regarding GSoc Application Date: Wed, 11 Apr 2012 11:52:35 +0530 Message-ID: <4f852334.2138440a.38d0.5998@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: Ac0XqvSlyhCyvFaORi6gJvFpzy388gAAEEZQ Content-Language: en-in X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201204/566 X-Sequence-Number: 206369 > >I think Multicorn is a good example, which invokes Python from FDW >routines though it is not using PL/Python. > >http://multicorn.org/ > > Hi Hitoshi, Thanks for the link. You mean,I should try to build something like Multicorn for Java? Atri From atri.jiit@gmail.com Wed Apr 11 06:27:16 2012 Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 5991DF7658 for ; Wed, 11 Apr 2012 03:27:16 -0300 (ADT) Received: from mail-pz0-f46.google.com ([209.85.210.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHr1M-0007mN-Mu for pgsql-jdbc@postgresql.org; Wed, 11 Apr 2012 06:27:15 +0000 Received: by dadz9 with SMTP id z9so845108dad.33 for ; Tue, 10 Apr 2012 23:26:59 -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=sr7yziPvp7cZSq029vNJ8CkTiMfcsf/s+B+4VkDwRPM=; b=GN2UnTBD8jo/UpKFPMVMmYYyFjAyWLQOhrTTVyG+4YiSgte7gKx0RMo+QCV83bGx0h mDP/ULrB2vyqwGbGTZCOGCRVzLr6gm+dkbnrOg2+Vf9n6IQGFX0zHWuWHnkjTZ3eY2Ux sa/adV9nIdDCUIFxCW2jSs9LhZCstCNzYRfvMYXoUvlfe+O+70KjXBP6QXK2alc62+Oz /yH1akZ9zLI5kP2qZy9jf+aIWbp1FKhp7jHIkifZtSysI2R7dEkjUyHZ/YGX2iD4RtmF V+Av5lu82mb+3haIOYHmljd/rHuWqNz1HI0UfUI/KX+1XZoIUgcmtWwXNtuor7YCmxjf QnJA== Received: by 10.68.236.132 with SMTP id uu4mr12324372pbc.11.1334125619244; Tue, 10 Apr 2012 23:26:59 -0700 (PDT) Received: from GITCPC ([122.177.230.99]) by mx.google.com with ESMTPS id pj1sm2003233pbc.44.2012.04.10.23.26.56 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 10 Apr 2012 23:26:58 -0700 (PDT) From: "Atri Sharma" To: "'John R Pierce'" , References: <4f802005.cc76440a.668b.ffffcd8e@mx.google.com> <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> <4f84fd5f.a93b440a.2eed.42c4@mx.google.com> <4 F8508C6.5090305@hogran ch.com> <4f850a5f.4537440a.3ae2.4930@mx.goog! le.com> <4F85183F.607 0806@hogranch.com> <4f851a34.c505440a.4905.4f24@mx.google.com> <4F851E57.5060802@hogranch.com> <4f85201e.e62a440a.3399.5b3f@mx.google.com> <4F8522D3.9060806@hogranch.co m> In-Reply-To: <4F8522D3.9060806@hogranch.com> Subject: Re: [HACKERS] Regarding GSoc Application Date: Wed, 11 Apr 2012 11:56:51 +0530 Message-ID: <4f852432.e1da440a.01db.60dd@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: Ac0Xq2OD1b3ZoeYBQhGSWabURp9cbAAAEK6w Content-Language: en-in X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201204/64 X-Sequence-Number: 22864 >see dblink ofr an example API >http://www.postgresql.org/docs/current/static/dblink.html > >the 'pljava fdw functions' are the publicly visible pljava functions >implementing your api... while my 'pljava code' are additional >functions/methods you use internally that aren't visible externally > > Hi John, Thanks for the link and advice. Ok,now I think I got your point.The Pl/Java FDW functions are what are used for the public FDW API....while Pl/Java code actually does the job,but it is hidden from the user.The user actually never gets to talk to the SQL part of the FDW,so he cannot cause much harm,right? If my understanding is correct,I think it will be a sweet solution. Please let me know your opinion. Atri From mmoncure@gmail.com Wed Apr 11 14:37:15 2012 Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 03820F7659; Wed, 11 Apr 2012 11:37:15 -0300 (ADT) Received: from mail-pb0-f46.google.com ([209.85.160.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHyfX-00082D-P6; Wed, 11 Apr 2012 14:37:14 +0000 Received: by pbcun15 with SMTP id un15so1302925pbc.19 for ; Wed, 11 Apr 2012 07:36:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=jzkPUSQnC7IhQIAIgMiUXEG2Z5HjLZtS5Wt9vLLF2sI=; b=rW1YtfQpqHtPrIsyTusFBaXKxz782uwWdMJuWjAksrLmf35D7TPuY1+W2zZHlfv0sB JtNQAzT7Zk+QH5Q3PwH+Q+gYbxj/RRgKRUufUvKpQoCGAqVEypwjq9mQIZJIKBknopFF uqTfxuWK6QY6t771OFb7XYfwawTSRJctfIJClRjaf2tuN4EIZoge+4/wlojuIHRGsqKU N/KdR5yvUgwanRAfthT8EHjCeXZH6KEuIVXhEadxgNinJqdd/+rpW9bpO+yaleNm6N3J vc4DTEsRD7FqqH9EOyqJ1jKhnQ+x5fUNGs8EAfKnpCgiZIr6QN8+VtdLS8C7bbwkxEV1 5DpA== MIME-Version: 1.0 Received: by 10.68.220.2 with SMTP id ps2mr38878499pbc.109.1334155018492; Wed, 11 Apr 2012 07:36:58 -0700 (PDT) Received: by 10.142.202.6 with HTTP; Wed, 11 Apr 2012 07:36:58 -0700 (PDT) In-Reply-To: <4f84fd5f.a93b440a.2eed.42c4@mx.google.com> 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> <4f84fd5f.a93b440a.2eed.42c4@mx.google.com> Date: Wed, 11 Apr 2012 09:36:58 -0500 Message-ID: Subject: Re: [JDBC] Regarding GSoc Application From: Merlin Moncure To: Atri Sharma Cc: Tom Lane , Andrew Dunstan , Dave Cramer , Pg Hackers , pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201204/577 X-Sequence-Number: 206380 On Tue, Apr 10, 2012 at 10:41 PM, Atri Sharma wrote: >>Well. maybe I spoke too soon...JNI is probably the best route. =A0Since >>SPI is off the table, all we're really pulling in from pl/java is the >>(non-trivial) proper installation of a jvm into a postgres process. >>pl/java is essentially a wrapper to JNI that does postgres to jni type >>conversion and builds a database driven class lookup system that >>allows building the java environment inside the database. =A0 That part >>is not needed at all; since we're not going to install our routines as >>pl/java installed they will be installed into a separate and more >>typical class path from a jvm point of view. There are no exposed >>routines in pljava.so that allow for easy manual invocation of a java >>routine -- it's all pretty much hardwired to the language function >>call handler system. >> >>This begs the question about why pl/java should be used at all. Well, >>as I said the jvm insertion into postgres is non-trivial so that alone >>is worth something. =A0Maybe though we should just rip out the jvm guts >>that we really need (mostly some parts of backend.c and some of the >>type files) and do a completely standalone jni wrapper. =A0pl/java's >>build system is a mess anyways so we're not losing all that much in >>trying to go off on our own and do something. =A0OTOH, throwing a build >>system on top of the growing pile of things to do is turning this into >>a daunting project vs the (admittedly cobbled together) approach I was >>hoping to do earlier. =A0Anyways, it's really Atri's call if he's >>comfortable proceeding. > > Hi All, > > I think we are back on the initial approach I proposed(hooking directly i= nto > 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 hav= e > the FDW wrapping JDBC directly through JNI.JNI would call pure Java > functions to connect to the JDBC. > > I think we can proceed with this.Once we are done with the API calling Ja= va > functions,I think the rest of the path is easily mapped(writing Java > functions to connect to JDBC). yeah -- it sound plausible. I think the next step is to pull one of the fdw projects that is working and currently builds with pgxs. Make sure it is bsd licensed and that you retain the original copyright in the code (feel free to add your own). The mysql_fdw project for example is a good candidate. After that we need to strip out all the mysql specific parts so that we have a basic skeleton of the fdw wrapper that still builds. From there we will need to build in the jni calls as well as jvm initialization code we are going to more or less directly copy from pl/java, but one thing at a time: IMO, getting the jvm installed and executing a 'hello world' jni is a good milestone to reach before getting into all the mechanics of the remote querying. The jvm initialization code in pl/java we are going to use is in src/C/pljava/backend.c. A lot of the initialization work done there is irrelevant to what we are trying to do but there are some very important bits like the on_proc_exit handler that does cleanup when the postgres process exits. Ideally we can drop just the stuff we need from there and get our project to compile. merlin From atri.jiit@gmail.com Wed Apr 11 14:38:32 2012 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 From atri.jiit@gmail.com Wed Apr 11 14:48:07 2012 Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id BC180F7659; Wed, 11 Apr 2012 11:48:07 -0300 (ADT) Received: from mail-pb0-f46.google.com ([209.85.160.46]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHyq4-0008Jc-An; Wed, 11 Apr 2012 14:48:06 +0000 Received: by pbcun15 with SMTP id un15so1314071pbc.19 for ; Wed, 11 Apr 2012 07:47:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-type:content-transfer-encoding:x-mailer :thread-index:content-language; bh=SdkwyAeHVIfZxdY786bWeCNLnem6aDtPsmua2pb06nI=; b=kecwoeU8FFqadR/UNu3hhVP7CX1CX6UbsbVh5rqkDOJlG0NnS2PXJIqvScyFG8rffC o+8VfX82sZchgGMxeI4c07KBr514diT1pYi06l4YcUqqHbo0oAlb9+uJ6F83konJLGY8 tOR+OAvV+nbuaRS5qerdBzWc5bgcUtNuAnSUefFjgonMr6cTUFMLKKUIyi+IxLyTfDIr pFVJXnwTboy7azfqMTeZtUg/IWNsTBpPrXA9sPruSV/QKzSxNN74jed87gZnvcRk99Jq 9tuWLzJWEti8Gh6l9GHxurTcfiKs3MMGB78cQhefrtBEGyQZKxvpjMyuf6pcv4TVcB5k scjQ== Received: by 10.68.217.201 with SMTP id pa9mr38609962pbc.73.1334155670259; Wed, 11 Apr 2012 07:47:50 -0700 (PDT) Received: from GITCPC ([122.177.230.99]) by mx.google.com with ESMTPS id f8sm3064766pbe.42.2012.04.11.07.47.45 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 11 Apr 2012 07:47:49 -0700 (PDT) From: "Atri Sharma" To: "'Merlin Moncure'" Cc: "'Tom Lane'" , "'Andrew Dunstan'" , "'Dave Cramer'" , "'Pg Hackers'" , 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> <4f84fd5f.a93b440a.2eed.42c4@mx.google.com> In-Reply-To: Subject: Re: [JDBC] Regarding GSoc Application Date: Wed, 11 Apr 2012 20:17:40 +0530 Message-ID: <4f859995.8813440a.399d.ffffa11c@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: Ac0X8I0SEOlJRUPASsiWzBYkLf5AgAAAFoow Content-Language: en-in X-Pg-Spam-Score: -2.7 (--) X-Archive-Number: 201204/580 X-Sequence-Number: 206383 On Tue, Apr 10, 2012 at 10:41 PM, Atri Sharma wrote: >>>Well. maybe I spoke too soon...JNI is probably the best route. Since >>>SPI is off the table, all we're really pulling in from pl/java is the >>>(non-trivial) proper installation of a jvm into a postgres process. >>>pl/java is essentially a wrapper to JNI that does postgres to jni type >>>conversion and builds a database driven class lookup system that >>>allows building the java environment inside the database. That part >>>is not needed at all; since we're not going to install our routines as >>>pl/java installed they will be installed into a separate and more >>>typical class path from a jvm point of view. There are no exposed >>>routines in pljava.so that allow for easy manual invocation of a java >>>routine -- it's all pretty much hardwired to the language function >>>call handler system. >>> >>>This begs the question about why pl/java should be used at all. Well, >>>as I said the jvm insertion into postgres is non-trivial so that alone >>>is worth something. Maybe though we should just rip out the jvm guts >>>that we really need (mostly some parts of backend.c and some of the >>>type files) and do a completely standalone jni wrapper. pl/java's >>>build system is a mess anyways so we're not losing all that much in >>>trying to go off on our own and do something. OTOH, throwing a build >>>system on top of the growing pile of things to do is turning this into >>>a daunting project vs the (admittedly cobbled together) approach I was >>>hoping to do earlier. Anyways, it's really Atri's call if he's >>>comfortable proceeding. >> >> Hi All, >> >> 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. >> >> I think we can proceed with this.Once we are done with the API calling Java >> functions,I think the rest of the path is easily mapped(writing Java >> functions to connect to JDBC). > >yeah -- it sound plausible. I think the next step is to pull one of >the fdw projects that is working and currently builds with pgxs. Make >sure it is bsd licensed and that you retain the original copyright in >the code (feel free to add your own). The mysql_fdw project for >example is a good candidate. After that we need to strip out all the >mysql specific parts so that we have a basic skeleton of the fdw >wrapper that still builds. From there we will need to build in the >jni calls as well as jvm initialization code we are going to more or >less directly copy from pl/java, but one thing at a time: IMO, >getting the jvm installed and executing a 'hello world' jni is a good >milestone to reach before getting into all the mechanics of the remote >querying. > >The jvm initialization code in pl/java we are going to use is in >src/C/pljava/backend.c. A lot of the initialization work done there >is irrelevant to what we are trying to do but there are some very >important bits like the on_proc_exit handler that does cleanup when >the postgres process exits. Ideally we can drop just the stuff we >need from there and get our project to compile. > I agree,atm I'll work on getting JNI set up and to build a JVM using it and getting the "Hello,World" running in it in PostGreSQl. I'll keep you posted, Atri From atri.jiit@gmail.com Tue Apr 17 13:13:07 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 2F7C915B9A79 for ; Tue, 17 Apr 2012 10:13:07 -0300 (ADT) Received: from mail-vx0-f174.google.com ([209.85.220.174]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SK8DN-0002je-Ax for pgsql-hackers@postgresql.org; Tue, 17 Apr 2012 13:13:06 +0000 Received: by vcqp1 with SMTP id p1so4053691vcq.19 for ; Tue, 17 Apr 2012 06:12:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=svGYv+sdr1LDUZQ9swn05PSkQ0PQdwIen4kPO0CBZU0=; b=B4U08kooY20UeMYJPZMmJ3LqOabNh+f37U/JciOJ5Zk8M+dkhDSv4uS5nnS8xIyCgy ihN1aAeiagqt9RbT+h0T7uRdbLaIdLzZxZGNb1nOuqDLx8MC3bQCOlTxbx4imW7vpQOg hw2FBzO3xpBE69x2In1GinJLkAJWROff90eTiGfr6oOuFGmHEskJPRHvwkrPx8WzAsgu 3TPTXV1pfhenXgdZ14oSLD6tASKOadyvYjBKQYw1LdIZPa/ssvL0qQ6UfOZ1oMSc9i3z FXwgIuqpLajRtgBeJCgTHt6LHl7C3wRqSJDabscBIkp5JAGxHcJ29Bj43XUOLJRl0N2X +Dtw== MIME-Version: 1.0 Received: by 10.52.24.108 with SMTP id t12mr6529944vdf.7.1334668368803; Tue, 17 Apr 2012 06:12:48 -0700 (PDT) Received: by 10.52.68.83 with HTTP; Tue, 17 Apr 2012 06:12:48 -0700 (PDT) In-Reply-To: <4f859995.8813440a.399d.ffffa11c@mx.google.com> 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> <4f84fd5f.a93b440a.2eed.42c4@mx.google.com> <4f859995.8813440a.399d.ffffa11c@mx.google.com> Date: Tue, 17 Apr 2012 18:42:48 +0530 Message-ID: Subject: Re: [JDBC] Regarding GSoc Application From: Atri Sharma To: Tom Lane , Andrew Dunstan , Dave Cramer , Pg Hackers , "pgsql-jdbc@postgresql.orgMerlin Moncure" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201204/885 X-Sequence-Number: 206688 On Wed, Apr 11, 2012 at 8:17 PM, Atri Sharma wrote: > > On Tue, Apr 10, 2012 at 10:41 PM, Atri Sharma wrote= : >>>>Well. maybe I spoke too soon...JNI is probably the best route. =A0Since >>>>SPI is off the table, all we're really pulling in from pl/java is the >>>>(non-trivial) proper installation of a jvm into a postgres process. >>>>pl/java is essentially a wrapper to JNI that does postgres to jni type >>>>conversion and builds a database driven class lookup system that >>>>allows building the java environment inside the database. =A0 That part >>>>is not needed at all; since we're not going to install our routines as >>>>pl/java installed they will be installed into a separate and more >>>>typical class path from a jvm point of view. There are no exposed >>>>routines in pljava.so that allow for easy manual invocation of a java >>>>routine -- it's all pretty much hardwired to the language function >>>>call handler system. >>>> >>>>This begs the question about why pl/java should be used at all. Well, >>>>as I said the jvm insertion into postgres is non-trivial so that alone >>>>is worth something. =A0Maybe though we should just rip out the jvm guts >>>>that we really need (mostly some parts of backend.c and some of the >>>>type files) and do a completely standalone jni wrapper. =A0pl/java's >>>>build system is a mess anyways so we're not losing all that much in >>>>trying to go off on our own and do something. =A0OTOH, throwing a build >>>>system on top of the growing pile of things to do is turning this into >>>>a daunting project vs the (admittedly cobbled together) approach I was >>>>hoping to do earlier. =A0Anyways, it's really Atri's call if he's >>>>comfortable proceeding. >>> >>> Hi All, >>> >>> 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 t= o > do >>> this is create a JVM that executes the Java code and give the control o= f > the >>> JVM to the native API. >>> >>> I agree,the only need of Pl/Java that is apparent here is the need of t= he >>> 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. >>> >>> I think we can proceed with this.Once we are done with the API calling > Java >>> functions,I think the rest of the path is easily mapped(writing Java >>> functions to connect to JDBC). >> >>yeah -- it sound plausible. =A0I think the next step is to pull one of >>the fdw projects that is working and currently builds with pgxs. Make >>sure it is bsd licensed and that you retain the original copyright in >>the code (feel free to add your own). =A0 The mysql_fdw project for >>example is a good candidate. =A0After that we need to strip out all the >>mysql specific parts so that we have a basic skeleton of the fdw >>wrapper that still builds. =A0 From there we will need to build in the >>jni calls as well as jvm initialization code we are going to more or >>less directly copy from pl/java, but one thing at a time: =A0IMO, >>getting the jvm installed and executing a 'hello world' jni is a good >>milestone to reach before getting into all the mechanics of the remote >>querying. >> >>The jvm initialization code in pl/java we are going to use is in >>src/C/pljava/backend.c. =A0A lot of the initialization work done there >>is irrelevant to what we are trying to do but there are some very >>important bits like the on_proc_exit handler that does cleanup when >>the postgres process exits. =A0Ideally we can drop just the stuff we >>need from there and get our project to compile. >> > > I agree,atm I'll work on getting JNI set up and to build a JVM using it a= nd > getting the "Hello,World" running in it in PostGreSQl. > > I'll keep you posted, > > Atri > Hi all, I just had a small doubt I wanted to clarify.I initially said in my proposal that I would be using SPI for getting the FDW API to call Pl/Java functions,but now,after discussion with the community,I have changed the approach and I will be using JNI Invocation API instead for the same purpose. I wanted to know if I need to send a modified proposal for the same or the original proposal shall still hold good. Atri --=20 Regards, Atri l'apprenant From andrew@dunslane.net Tue Apr 17 14:08:29 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 7439D15B9A79 for ; Tue, 17 Apr 2012 11:08:29 -0300 (ADT) Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SK951-0003iz-KQ for pgsql-hackers@postgresql.org; Tue, 17 Apr 2012 14:08:28 +0000 X-Originating-IP: 217.70.178.138 Received: from mfilter9-d.gandi.net (mfilter9-d.gandi.net [217.70.178.138]) by relay4-d.mail.gandi.net (Postfix) with ESMTP id 69BFA1720D6; Tue, 17 Apr 2012 16:08:03 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter9-d.gandi.net Received: from relay4-d.mail.gandi.net ([217.70.183.196]) by mfilter9-d.gandi.net (mfilter9-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id DerQ4cSBqw1J; Tue, 17 Apr 2012 16:08:02 +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 0D1A51720A5; Tue, 17 Apr 2012 16:08:00 +0200 (CEST) Message-ID: <4F8D793E.1070703@dunslane.net> Date: Tue, 17 Apr 2012 10:07:58 -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: Atri Sharma CC: Tom Lane , Dave Cramer , Pg Hackers , "pgsql-jdbc@postgresql.orgMerlin Moncure" 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> <4F84480F.1020905@dunslane.net> <9511.1334071505@sss.pgh.pa.us> <9745.1334072198@sss.pgh.pa.us> <4f84fd5f.a93b440a.2eed.42c4@mx.google.com> <4f859995.8813440a.399d.ffffa11c@mx.google.com> 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/894 X-Sequence-Number: 206697 On 04/17/2012 09:12 AM, Atri Sharma wrote: > I just had a small doubt I wanted to clarify.I initially said in my > proposal that I would be using SPI for getting the FDW API to call > Pl/Java functions,but now,after discussion with the community,I have > changed the approach and I will be using JNI Invocation API instead > for the same purpose. I wanted to know if I need to send a modified > proposal for the same or the original proposal shall still hold good. These are not the right forums to ask this question. You need to ask on the GSOC specific forum. cheers andrew From atri.jiit@gmail.com Tue Apr 17 14:10:47 2012 Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 8219815B9A79 for ; Tue, 17 Apr 2012 11:10:47 -0300 (ADT) Received: from mail-vb0-f46.google.com ([209.85.212.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SK97D-0003oI-2R for pgsql-hackers@postgresql.org; Tue, 17 Apr 2012 14:10:47 +0000 Received: by vbbff1 with SMTP id ff1so4161528vbb.19 for ; Tue, 17 Apr 2012 07:10:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=LZkw5E3ikNdcehbD0Lke5RpOX2oNlhPYcxyhBKj8Ijw=; b=TmzPMZVkbHWxw/ZnAfhFEwnaEyecuelmeykU3Wj9tU511g76ithgyFsccx0ggw+0ds Dmm8Pco5v+AxAJaMzoilj936xfIUoNCJfnPUA6gDzLpQiXDLSK4Zn1Tn5AJPhcP7YFU4 7KooTQLKw3Ruon1NalxnRJu/Vjle8NiIyqzsSS1V0R3gwZVzrwq/werljPfJvCa59g3A K7bkl3aspo2IGNJih6kpF/rwlfzroFN/qQoVWwRic6xfo2C3Exr1fSqTxRq75/piYOwQ MxdWjyjjOIP5o+E44wDrLI0zzABYRZFTVyXcJdYS0SwzYGq3IpudTBZtUy8GxfrqRSF5 tnVA== MIME-Version: 1.0 Received: by 10.220.153.84 with SMTP id j20mr1645956vcw.3.1334671830305; Tue, 17 Apr 2012 07:10:30 -0700 (PDT) Received: by 10.52.68.83 with HTTP; Tue, 17 Apr 2012 07:10:30 -0700 (PDT) In-Reply-To: <4F8D793E.1070703@dunslane.net> 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> <4f84fd5f.a93b440a.2eed.42c4@mx.google.com> <4f859995.8813440a.399d.ffffa11c@mx.google.com> <4F8D793E.1070703@dunslane.net> Date: Tue, 17 Apr 2012 19:40:30 +0530 Message-ID: Subject: Re: [JDBC] Regarding GSoc Application From: Atri Sharma To: Andrew Dunstan Cc: Tom Lane , Dave Cramer , Pg Hackers , "pgsql-jdbc@postgresql.orgMerlin Moncure" Content-Type: text/plain; charset=ISO-8859-1 X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201204/895 X-Sequence-Number: 206698 On Tue, Apr 17, 2012 at 7:37 PM, Andrew Dunstan wrote: > > > On 04/17/2012 09:12 AM, Atri Sharma wrote: >> >> I just had a small doubt I wanted to clarify.I initially said in my >> proposal that I would be using SPI for getting the FDW API to call Pl/Java >> functions,but now,after discussion with the community,I have changed the >> approach and I will be using JNI Invocation API instead for the same >> purpose. I wanted to know if I need to send a modified proposal for the same >> or the original proposal shall still hold good. > > > These are not the right forums to ask this question. You need to ask on the > GSOC specific forum. > > cheers > > andrew Thanks Andrew.I'll keep that in mind. -- Regards, Atri l'apprenant