Re: [HACKERS] [JDBC] Regarding GSoc Application

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

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 I

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-17 Thread Atri Sharma
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.  Since SPI is off the table, all we're really pulling in from pl/java is the (non-trivial) proper installation of

Re: [HACKERS] [JDBC] Regarding GSoc Application

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

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 ex

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-11 Thread Merlin Moncure
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 wrap

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 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 (pgsql

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Hitoshi Harada
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 th

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. may

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Merlin Moncure
On Tue, Apr 10, 2012 at 11:07 AM, Merlin Moncure 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, but Atri is en

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Merlin Moncure
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?  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 sayin

Re: [HACKERS] [JDBC] Regarding GSoc Application

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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Tom Lane
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 b

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Atri Sharma
On Tue, Apr 10, 2012 at 8:55 PM, Tom Lane wrote: > 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 t

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Dave Cramer
On Tue, Apr 10, 2012 at 11:25 AM, Tom Lane wrote: > 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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Tom Lane
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 abou

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Merlin Moncure
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

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 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(Ser

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Merlin Moncure
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

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 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 Interf

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-10 Thread Merlin Moncure
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

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 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 ?

Re: [HACKERS] [JDBC] Regarding GSoc Application

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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-09 Thread Merlin Moncure
On Mon, Apr 9, 2012 at 12: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

Re: [HACKERS] [JDBC] Regarding GSoc Application

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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-09 Thread Kevin Grittner
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

Re: [HACKERS] [JDBC] Regarding GSoc Application

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

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 f

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-09 Thread Merlin Moncure
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.

Re: [HACKERS] [JDBC] Regarding GSoc Application

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

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-09 Thread Merlin Moncure
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

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, 2012

Re: [HACKERS] [JDBC] Regarding GSoc Application

2012-04-09 Thread Merlin Moncure
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 que

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 wrote: > Hi All, > > > > I submitted a GSoc application yesterday. Please review it and let me know