Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-17 Thread Atri Sharma
On Wed, Apr 11, 2012 at 8:17 PM, Atri Sharma atri.j...@gmail.com wrote: On Tue, Apr 10, 2012 at 10:41 PM, Atri Sharma atri.j...@gmail.com 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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-17 Thread Andrew Dunstan
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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-17 Thread Atri Sharma
On Tue, Apr 17, 2012 at 7:37 PM, Andrew Dunstan and...@dunslane.net 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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-11 Thread Hitoshi Harada
On Tue, Apr 10, 2012 at 8:41 PM, Atri Sharma atri.j...@gmail.com 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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-11 Thread Atri Sharma
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 -- Sent via pgsql-hackers mailing list

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-11 Thread Merlin Moncure
On Tue, Apr 10, 2012 at 10:41 PM, Atri Sharma atri.j...@gmail.com 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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-11 Thread Atri Sharma
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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-11 Thread Atri Sharma
On Tue, Apr 10, 2012 at 10:41 PM, Atri Sharma atri.j...@gmail.com 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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Andrew Dunstan
On 04/09/2012 01:25 PM, Atri Sharma wrote: On Mon, Apr 9, 2012 at 10:15 PM, Andrew Dunstanand...@dunslane.net 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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Merlin Moncure
On Tue, Apr 10, 2012 at 8:42 AM, Andrew Dunstan and...@dunslane.net 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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Andrew Dunstan
On 04/10/2012 09:48 AM, Merlin Moncure wrote: On Tue, Apr 10, 2012 at 8:42 AM, Andrew Dunstanand...@dunslane.net 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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Merlin Moncure
On Tue, Apr 10, 2012 at 9:15 AM, Andrew Dunstan and...@dunslane.net wrote: On 04/10/2012 09:48 AM, Merlin Moncure wrote: On Tue, Apr 10, 2012 at 8:42 AM, Andrew Dunstanand...@dunslane.net  wrote: I am considering two paths for doing this: The first one takes the help of the SPI(Server

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Andrew Dunstan
On 04/10/2012 10:34 AM, Merlin Moncure wrote: On Tue, Apr 10, 2012 at 9:15 AM, Andrew Dunstanand...@dunslane.net wrote: On 04/10/2012 09:48 AM, Merlin Moncure wrote: On Tue, Apr 10, 2012 at 8:42 AM, Andrew Dunstanand...@dunslane.net wrote: I am considering two paths for doing this: The

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Merlin Moncure
On Tue, Apr 10, 2012 at 9:47 AM, Andrew Dunstan and...@dunslane.net 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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Tom Lane
Merlin Moncure mmonc...@gmail.com 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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Dave Cramer
On Tue, Apr 10, 2012 at 11:25 AM, Tom Lane t...@sss.pgh.pa.us wrote: Merlin Moncure mmonc...@gmail.com 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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Atri Sharma
On Tue, Apr 10, 2012 at 8:55 PM, Tom Lane t...@sss.pgh.pa.us wrote: Merlin Moncure mmonc...@gmail.com 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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Tom Lane
Atri Sharma atri.j...@gmail.com writes: On Tue, Apr 10, 2012 at 8:55 PM, Tom Lane t...@sss.pgh.pa.us 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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Andrew Dunstan
On 04/10/2012 11:36 AM, Tom Lane wrote: Atri Sharmaatri.j...@gmail.com writes: On Tue, Apr 10, 2012 at 8:55 PM, Tom Lanet...@sss.pgh.pa.us 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.

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Merlin Moncure
On Tue, Apr 10, 2012 at 10:36 AM, Tom Lane t...@sss.pgh.pa.us wrote: Atri Sharma atri.j...@gmail.com writes: On Tue, Apr 10, 2012 at 8:55 PM, Tom Lane t...@sss.pgh.pa.us wrote: Hm?  SPI doesn't know anything about Java either. We plan to call SQL through SPI from the FDW,which in turn would

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Merlin Moncure
On Tue, Apr 10, 2012 at 11:07 AM, Merlin Moncure mmonc...@gmail.com wrote:  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,

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Atri Sharma
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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-09 Thread Merlin Moncure
On Sun, Apr 8, 2012 at 8:56 AM, Dave Cramer p...@fastcrypt.com 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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-09 Thread Dave Cramer
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,

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-09 Thread Merlin Moncure
On Mon, Apr 9, 2012 at 10:47 AM, Dave Cramer p...@fastcrypt.com 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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-09 Thread Dave Cramer
On Mon, Apr 9, 2012 at 11:55 AM, Merlin Moncure mmonc...@gmail.com wrote: On Mon, Apr 9, 2012 at 10:47 AM, Dave Cramer p...@fastcrypt.com 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 ?

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-09 Thread Merlin Moncure
On Mon, Apr 9, 2012 at 11:14 AM, Dave Cramer p...@fastcrypt.com 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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-09 Thread Andrew Dunstan
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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-09 Thread Dave Cramer
On Mon, Apr 9, 2012 at 12:45 PM, Andrew Dunstan and...@dunslane.net 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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-09 Thread Kevin Grittner
Dave Cramer p...@fastcrypt.com wrote: Andrew Dunstan and...@dunslane.net wrote: All you'll need on the postgres side is the relevant JDBC driver, so you'd have instant access via standard select queries to anything you can get a JDBC driver to talk to. That seems to me something worth

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-09 Thread Atri Sharma
On Mon, Apr 9, 2012 at 10:15 PM, Andrew Dunstan and...@dunslane.net 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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-09 Thread Merlin Moncure
On Mon, Apr 9, 2012 at 12:25 PM, Atri Sharma atri.j...@gmail.com wrote: On Mon, Apr 9, 2012 at 10:15 PM, Andrew Dunstan and...@dunslane.net 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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-09 Thread Atri Sharma
On Mon, Apr 9, 2012 at 11:40 PM, Merlin Moncure mmonc...@gmail.com wrote: On Mon, Apr 9, 2012 at 12:25 PM, Atri Sharma atri.j...@gmail.com wrote: On Mon, Apr 9, 2012 at 10:15 PM, Andrew Dunstan and...@dunslane.net wrote: On 04/09/2012 12:14 PM, Dave Cramer wrote: So I'm confused, once they

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-08 Thread Dave Cramer
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 atri.j...@gmail.com wrote: Hi All, I submitted a GSoc application yesterday. Please review it