Functions and triggers

From: "Fontenot, Paul" <Paul(dot)Fontenot(at)bannerhealth(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: Functions and triggers
Date: 2003-05-13 21:52:25
Message-ID: 230BCAB977308F43BD851AFAE55A86410AA6A1@phx01018.bannerhealth.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hopefully I can do what I want with a combination of functions and
triggers, the drawback being that I am coming from several years of
MySQL and know nothing about PostgreSQL functions or triggers. I
currently use msyslogd on linux to log syslog messages to a postgresql
database. I want to be able to do things - like send an email, etc... -
when certain messages are inserted into the database.

I have this for the table:

syslog=> \d syslogtb
Table "syslogtb"
Column | Type | Modifiers
----------+------------------------+-----------
facility | character(10) |
priority | character(10) |
date | date |
time | time without time zone |
host | character varying(128) |
message | text |

syslog=>

And this is an example of the message field data:

%PIX-3-106011: Deny inbound (No xlate) udp src inside:10.10.1.160/1035
dst inside:10.29.0.45/161

How would I create and use a function/trigger to key on the PIX error
message code (%PIX-3-106011)?

Thanks in advance for your help

-Paul

***PRIVILEGED & CONFIDENTIAL***
Unless expressly stated otherwise, this message (and any attachment(s)
thereto) is confidential and may be privileged. It is intended for the
addressee(s) only. If you are not an addressee, any disclosure or
copying of the contents of this e-mail or any action taken (or not
taken) in reliance on it is strictly prohibited. If you are not an
addressee, please inform sender immediately and delete this message from
your system.

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Katy Earl 2003-05-13 22:25:17 Re: can't alter user with the postgres user
Previous Message Katy Earl 2003-05-13 21:15:46 Re: can't alter user with the postgres user