On Mon, Oct 27, 2008 at 03:09:31PM -0300, 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

This will scale better if you batch it, as in:

INSERT INTO clients (name, status)
VALUES
    ('Donda', 'inserted_no_directory'),
    ('Eonda', 'inserted_no_directory'),
    ('Fonda', 'inserted_no_directory'),
    ...

Once you're done loading, sweep through the ones so marked.

Cheers,
David.
-- 
David Fetter <[EMAIL PROTECTED]> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: [EMAIL PROTECTED]

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to