pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guy Rouillier <guyr-ml1@burntmail.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: problem urgent - please help
Date: Sat, 28 Jul 2007 00:42:35 -0400
Message-ID: <46AAC93B.2040305@burntmail.com> (raw)
In-Reply-To: <1185588020.46aaa3345f626@webmail.ksu.edu>
References: <1185588020.46aaa3345f626@webmail.ksu.edu>

vbhatia@ksu.edu wrote:
> I have written a Java application that reads the data from a postgresql
> database and retrieves a particular field, performs some actions on
> that field and finally store the calculated data in some other
> table.The postgresql database, however is changing continuously , since
> new data is being added every minute. My problem is that I want to
> write some trigger in my java application that would be invoked as soon
> as there is a change in the database and perform the above actions for
> that newly added row.

You can write a trigger in Java.  If you're asking if a trigger in 
PostgreSQL can invoke your standalone Java program, the short answer is 
no.  You can probably rig something up using an untrusted PL language, 
though.  There is no untrusted Java implementation, though, so you'd 
have to use another one to implement the glue code.  Sounds like your 
best bet would be to write a trigger in Java, and just run the whole 
thing in the DB.

-- 
Guy Rouillier



view thread (3+ messages)  latest in thread

Message-ID: <46AAC93B.2040305@burntmail.com>
Permalink:  ../46AAC93B.2040305@burntmail.com/
Also on:    postgresql.org/message-id/46AAC93B.2040305@burntmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: guyr-ml1@burntmail.com
  Subject: Re: problem urgent - please help
  In-Reply-To: <46AAC93B.2040305@burntmail.com>
  References: <1185588020.46aaa3345f626@webmail.ksu.edu> <46AAC93B.2040305@burntmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox