Re: - trigger/function & java methods - Mailing list pgsql-jdbc

From Paul Thomas
Subject Re: - trigger/function & java methods
Date
Msg-id 20030816001833.A5868@bacon
Whole thread Raw
In response to - trigger/function & java methods  ("" <sarathi@excite.com>)
List pgsql-jdbc
On 15/08/2003 16:37 sarathi@excite.com wrote:
>
>
> Hi All,
>          I would like to know how to call a java method from sql trigger
> code or a function.


I'm no expert on this (in fact, I try to avoid using SPs as it embeds
business logic within the database - not nice) but the only way I can that
you could currently do this would be to write a C function which spawns a
JVM and executes your class. I'm confident that you're a sufficiently
experienced developer to instantly realize that this would almost
certainly bring the server to its knees :-(

That said, I'm curious about why you want to call a Java SP (other than
you can't implement some essential function without resorting to SPs and
you don't have time to learn a new language..).
rgds

--
Paul Thomas
+------------------------------+---------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for the Smaller
Business |
| Computer Consultants         |
http://www.thomas-micro-systems-ltd.co.uk   |
+------------------------------+---------------------------------------------+

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: CVS JDBC driver will try to use server-side-prepare on unpreparable SQL
Next
From: Oliver Jowett
Date:
Subject: Re: CVS JDBC driver will try to use server-side-prepare on unpreparable SQL