Re: implemention of calls to stored procs.

From: Nic Ferrier <nferrier(at)tapsellferrier(dot)co(dot)uk>
To: Doug McNaught <doug(at)wireboard(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: implemention of calls to stored procs.
Date: 2002-01-23 02:27:49
Message-ID: 87665tyf6i.fsf@tf1.tapsellferrier.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Doug McNaught <doug(at)wireboard(dot)com> writes:

> Nic Ferrier <nferrier(at)tapsellferrier(dot)co(dot)uk> writes:
>
> > It's not terribly difficult to crack this actually... I was going to
> > use GCJ as a platform for a base java class that could be used like a
> > quick C stored proc.
>
> Interesting approach. The other person that posted recently was going
> to run Java as a separate daemon, since the idea of linking postgres
> with the JVM was causing loud gagging sounds among the members of this
> list (for reasons I agree with).
>
> Are you talking about Java compiled to native code rather than
> bytecode? I know GCJ can do that and it would seem to be a better way
> to do this (since you can already link in native compiled C
> libraries).

Yes. But that's just the start. PostgreSQL can link in shared
librarys, GCJ can make shared librarys from java source code (and more
importantly from a combination of java and C++ source code!).

But once it's doing that it should be possible to get GCJ to load
class files as well (because GCJ can do that).

> The other thing to be aware of is that, if GCJ requires linking with
> thread libraries, you may have some problems, since the PG backend
> itself is not threaded--I'm not sure I'd want a threaded library call
> running in a non-thread-aware app.

GCJ doesn't require thread libs, you can build with no-threads.

Also, I have to admit that I'm not sure how a compiled lib works in
terms of threads, whether it starts a new (real) thread only when the
java code wants to start a new thread or whether it forks into a new
thread straight away. I suspect the former (easy enough to find out on
linux though).

Anyway, should be a laugh!

Nic

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2002-01-23 02:31:57 Re: detecting deadlocks
Previous Message Martijn van Oosterhout 2002-01-23 02:22:53 Re: detecting deadlocks