Re: Execute Shell script after insert

From: Andreas Jochem <andruit(at)gmx(dot)de>
To: Anderson dos Santos Donda <andersondonda(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Execute Shell script after insert
Date: 2008-10-27 18:38:22
Message-ID: 49060A9E.9030700@gmx.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

You can write the insert into command in a shellscript by using

#!/bin/bash

psql -c "INSERT INTO ...." <db_name> -U <username>

mkdir $1

Anderson dos Santos Donda wrote:
> Is there a way to execute a simple shell script in server after
> execute INSERT INTO ?
>
> Example?
>
> INSERT INTO clients (name) VALUES ('Donda');
>
>
> after it, execute shell : mkdir $1
>
>
>
> Thanks!!!

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2008-10-27 18:54:54 Re: Execute Shell script after insert
Previous Message Hannes Dorbath 2008-10-27 18:37:36 Re: EXECUTE in trigger functions.