Re: Shell access & send email from PLPGSQL?

From: "John Sidney-Woollett" <johnsw(at)wardbrook(dot)com>
To: "Philippe Lang" <philippe(dot)lang(at)attiksystem(dot)ch>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Shell access & send email from PLPGSQL?
Date: 2003-12-09 10:16:37
Message-ID: 2257.192.168.0.64.1070964997.squirrel@mercury.wardbrook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Why not create a cron script which connects to the database and queries
your tables (using psql). Have it generate an output (shell) script which
your original script then calls.

Unfortunately I know how to do this with Oracle, but not postgres *yet*,
but I suspect that in principle this idea will work.

Maybe someone else has an example, or a better suggestion.

John Sidney-Woollett

Philippe Lang said:
> Hello,
>
> How can open a unix shell from a PLPGSQL function / trigger?
>
> I would like to send an email from a postgres database, and also send some
> unix commands to the server, through the database...
>
> Thanks
>
> -------------------------
> Philippe Lang
> Attik System
> http://www.attiksystem.ch
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gellert, Andre 2003-12-09 10:22:15 Reset oid , starting value=1
Previous Message Philippe Lang 2003-12-09 09:59:42 Shell access & send email from PLPGSQL?