How to execute a system command inside a SQL statement

Поиск
Список
Период
Сортировка
От developer_student
Тема How to execute a system command inside a SQL statement
Дата
Msg-id 7515255.post@talk.nabble.com
обсуждение исходный текст
Ответы Re: How to execute a system command inside a SQL statement  (Richard Broersma Jr <rabroersma@yahoo.com>)
Список pgsql-novice
Hi all!

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?
Thank you in advance.

--
View this message in context:
http://www.nabble.com/How-to-execute-a-system-command-inside-a-SQL-statement-tf2694802.html#a7515255
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.


В списке pgsql-novice по дате отправления:

Предыдущее
От: Ennio-Sr
Дата:
Сообщение: Re: How to get single raws for sums in a summary table?
Следующее
От: Richard Broersma Jr
Дата:
Сообщение: Re: How to execute a system command inside a SQL statement