Received: from belphigor.mcnaught.org ([216.151.155.121]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7Q1g2f33750 for ; Sat, 25 Aug 2001 21:42:02 -0400 (EDT) (envelope-from doug@wireboard.com) Received: (from doug@localhost) by belphigor.mcnaught.org (8.9.3/8.9.3) id VAA09185; Sat, 25 Aug 2001 21:41:57 -0400 X-Authentication-Warning: belphigor.mcnaught.org: doug set sender to doug@wireboard.com using -f To: "Gowey, Geoffrey" Cc: "'Dr. Evil'" , pgsql-general@postgresql.org Subject: Re: PL/java? References: From: Doug McNaught Date: 25 Aug 2001 21:41:55 -0400 In-Reply-To: "Gowey, Geoffrey"'s message of "Sat, 25 Aug 2001 20:08:44 -0400" Message-ID: Lines: 30 User-Agent: Gnus/5.0806 (Gnus v5.8.6) XEmacs/21.1 (20 Minutes to Nikko) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200108/813 X-Sequence-Number: 14218 "Gowey, Geoffrey" writes: > probably a bad idea. From what I've heard the speed of your java program is > wholely dependent on the speed of your vm (and most aren't that quick). > Although it would be nice to have just to say we have it and mysql doesn't > (then again mysql doesn't have a whole lot of things that pgsql already > has). Well, compiled Java code can't be that much slower than PL/pgSQL code or TCL. both of which work fine for lots of people... I've though about doing this. It's definitely doable, but here are some gotchas: * The JVM is multithreaded, while backends are single-threaded. This could open up a big can of worms if you're not careful. On platforms with different libc's for threaded/nonthreaded code, you'd have to get the linking right. * In order to be useful, you'd need to write a JNI wrapper for the SPI libraries. Again, threading issues may apply. It's an interesting project, but not one I've had time to look at yet. -Doug -- Free Dmitry Sklyarov! http://www.freesklyarov.org/ We will return to our regularly scheduled signature shortly.