Re: System commands

From: Syd Alsobrook <syd(at)ittagteam(dot)com>
To: Brett Schwarz <brett_schwarz(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: System commands
Date: 2002-02-01 04:34:18
Message-ID: 3C5A1ACA.9080206@ittagteam.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Didn't know about that one. Thanks.

Syd

Brett Schwarz wrote:

> pgmail won't do what you want? If nothing else, it might give you an idea
> on how to roll your own...
>
> http://sourceforge.net/projects/pgmail/
>
>
> On Thu, 31 Jan 2002 19:23:35 -0500
> Syd Alsobrook <syd(at)ittagteam(dot)com> wrote:
>
>
>>I want to be able to trigger an email to be sent. I understand the
>>security concerns, I have seen this done in the past with oracle. We had
>>our database doing the backups from a sql script. Would it have to be in
>>C or could I use another language?
>>
>>Syd
>>
>>
>>Jan Wieck wrote:
>>
>>
>>>Syd Alsobrook wrote:
>>>
>>>
>>>>That's from psql, what about from a trigger or stored procedure.
>>>>
>>>>Syd
>>>>
>>>>
>>>>omid omoomi wrote:
>>>>
>>>>
>>>>>using \!
>>>>>
>>> Don't know what you need that for, but are you aware of all
>>> the side effects and implications such a functionality would
>>> have? The command you'd be calling will be executed by the
>>> database system owner, so it'd have access to all files of
>>> the entire database instance without any access restrictions.
>>>
>>> Also, the command will be called regardless and without
>>> further notice of an eventually later happening ROLLBACK.
>>> Does your filesystem have a ROLLBACK for unlink(2)?
>>>
>>> If that is really what you want, you can write a C function
>>> and use system(3) in there. But remember that this opens the
>>> flood gate for everything that is owned by the unix user
>>> running that postmaster, not only the databases you declare
>>> the function in.
>>>
>>>
>>>Jan
>>>
>>>--
>>>
>>>
>>#======================================================================#>
>># It's easier to get forgiveness for being wrong than for being right. #>
>># Let's break this rule - forgive me. #>
>>#================================================== JanWieck(at)Yahoo(dot)com #>
>>
>>>_________________________________________________________
>>>Do You Yahoo!?
>>>Get your free @yahoo.com address at http://mail.yahoo.com
>>>
>>>
>>
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 5: Have you checked our extensive FAQ?
>>
>>http://www.postgresql.org/users-lounge/docs/faq.html
>>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Lincoln Yeoh 2002-02-01 05:43:44 Re: timestamp weirdness
Previous Message Thomas Lockhart 2002-02-01 04:14:02 Re: timestamp weirdness