X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 42BCBD1C511 for ; Fri, 30 Jan 2004 15:49:06 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 81328-04 for ; Fri, 30 Jan 2004 11:49:10 -0400 (AST) Received: from hosting.commandprompt.com (215.commandprompt.com [207.173.200.215]) by svr1.postgresql.org (Postfix) with ESMTP id 4B607D1B4BD for ; Fri, 30 Jan 2004 11:49:05 -0400 (AST) Received: from commandprompt.com (dsl093-038-087.pdx1.dsl.speakeasy.net [66.93.38.87]) (authenticated) by hosting.commandprompt.com (8.11.6/8.11.6) with ESMTP id i0UFnAm17796 for ; Fri, 30 Jan 2004 07:49:10 -0800 Message-ID: <401A7CF0.9020302@commandprompt.com> Date: Fri, 30 Jan 2004 07:49:04 -0800 From: Robby Russell Organization: Command Prompt, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-php@postgresql.org Subject: Re: Triggers, Rules and email References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/30 X-Sequence-Number: 2546 scott.marlowe typed this on 01/20/2004 09:59 AM: > On Tue, 20 Jan 2004, Paul wrote: > > >>Anyone know if I can create a trigger or a rule in Pgsql that will send >>an email in the event of an attempt to update a database field no-one >>should be updating? > > > Sure, that would involve installing the pl language of your choice as an > untrusted language. PHP can be installed that way as a pl, btw, then you > can just use the mail() trigger function in it. > > http://www.commandprompt.com/entry.lxp?lxpe=294 > > Yes, plPHP can be used for this. If you want an example, let me know and I'll post one on the list. -Robby -- #------------------------------------------------------- # Robby Russell, | Sr. Administrator / Lead Programmer # Command Prompt, Inc. | http://www.commandprompt.com # rrussell@commandprompt.com | Telephone: (503) 667.4564 #-------------------------------------------------------