Re: How to execute a system command inside a SQL statement - Mailing list pgsql-novice

From Richard Broersma Jr
Subject Re: How to execute a system command inside a SQL statement
Date
Msg-id 986063.80774.qm@web31806.mail.mud.yahoo.com
Whole thread Raw
In response to How to execute a system command inside a SQL statement  (developer_student <juamagb1@gmail.com>)
Responses Re: How to execute a system command inside a SQL statement  (Sean Davis <sdavis2@mail.nih.gov>)
List pgsql-novice
> I want to execute 'java MyApp' everytime one row is inserted on a table.
> What is the correct function to do it?
>
> I want something like this:
>
> CREATE TRIGGER executeJava
>      AFTER INSERT ON mytable
>      FOR EACH ROW
>      BEGIN
>      SYSTEM('java MyApp');
>      END;
>
> I suppose SYSTEM('java MyApp') is not correct syntax. What is the correct
> syntax to get it? Sorry, I'm relatively new on PostgreSQL.
>
> Anyone can help me, please?

I am not sure sure how you could go about doing this.  If you do not get the answer you are
looking for on this list you might try the pg_general mailing list.

Here is the only thing that I can think of that might work for you:
http://pgfoundry.org/projects/pljava/

Regards,

Richard Broersma Jr.

pgsql-novice by date:

Previous
From: developer_student
Date:
Subject: How to execute a system command inside a SQL statement
Next
From: Sean Davis
Date:
Subject: Re: How to execute a system command inside a SQL statement