Trigger/Function Problem - Mailing list pgsql-general

From kowal@nawigator.pl
Subject Trigger/Function Problem
Date
Msg-id 3A816389.1C823506@nawigator.pl
Whole thread Raw
Responses Re: Trigger/Function Problem  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-general
                                Table "mp3user"
     Attribute   |    Type     |                     Modifier
--------------+-------------+--------------------------------------------------

       id           | integer     | not null default
nextval('mp3user_id_seq'::text)
      nick         | varchar(20) |

                 Table "mp3user_data"
 Attribute    |    Type        |       Modifier
------------+-------------+----------------------
id               | integer        | not null
imie            | varchar(30)  | not null
nazwisko     | varchar(30)  | not null

I have to table looking like the above (only bigger).

What I want to do I to set a trigger which ON DELETE from "mp3user"
table
will automatically DELETE a row from "mp3user_data" table.

The index in the mp3user is the same as the id from mp3user_data which
should be errased. I've tried looking at the helps in the manual by
about Triggers and Function they kinda suck.

If anyone could solve my problem I would be very, Very grateful.
If possible mail me at: <a
href="mailto:kowal@nawigator.pl">kowal@nawigator.pl</a>

Monsier Kowal


pgsql-general by date:

Previous
From: Brice Ruth
Date:
Subject: Re: (Update) Implicit smallint to boolean conversion?
Next
From: "ross::barna"
Date:
Subject: ALTER DROP COLUMN