Thomas Hallgren wrote:
> Hi,
> I've made some very encouraging tests using The GNU version of Java known as
> GCJ together with my Pl/Java implementation . At present I use GCJ just like
> any other JVM, i.e. as an interpreter. This is not very optimal since GCJ
> can compile all Java code into shared libraries just like it would compile C
> or C++ code.
> 
> Putting it short, there's a tradeoff between adhering to the proposed
> standard for SQL/Java mapping and using precompiled shared objects.
> Pre-loaded modules loaded by the postmaster for instance, can never be
> standard although it will help boost performance a great deal.
> 
> I guess that extending the proposed functionality is OK as long as attempts
> are made to follow the standard whenever possible. To do this, I'd like some
> advice concerning loading of shared libraries that are the result of a jar
> file gcj compilation.
> 
> Today, using a "normal" JVM, I can install modules in the form of jar files
> into the database. The modules can then be used dynamically and on demand by
> Pl/Java. Using GCJ, I'd like to have the same semantics from a user
> perspective (since they are modelled from the standard proposal) but behind
> the scene the jar file should be compiled into a shared library which then
> is made available to postgres. Question is, where do I store the shared
> object, and how do I load it? Ideally, I'd like it to be stored in the
> database and subject to normal grant/revoke rights etc. but dlopen() will
> hardly look there. So instead, I'd like to store it somewhere in the
> filesystem on the server where postmaster runs.
> 
> Is PostgreSQL doing something similar in other places today (i.e. install a
> shared library on the server using SQL commands issued from the client)? Any
> thoughts and/or ideas on this are greatly appreciated.

It seems this would be handled just like we handle C functions today,
that is you create a shared object file, it sits in the file system, and
you LOAD the object into your backend, or you record it via CREATE
FUNCTION and specify the pathname.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to