From: Andrzej Mazurkiewicz <andrzej.mazurkiewicz@polkomtel.com.pl>
To: 'Raigo Lukk' <l950681@ttu.ee>
To: pgsql-general@postgreSQL.org
Subject: RE: [GENERAL] Trigger
Date: Tue, 7 Mar 2000 14:11:23 +0100
Message-ID: <13288F4408ADD11186FF0060B06A431303648CA2@MSGWAW1> (raw)
Switch to v7.0 beta1 and use FOREIGN KEY. You will save a lot of time.
Before you really finish your development there will be 7.0 production (this
is my private estimation).
Andrzej Mazurkiewicz
> -----Original Message-----
> From: Raigo Lukk [SMTP:l950681@ttu.ee]
> Sent: 7 marca 2000 13:55
> To: pgsql-general@postgreSQL.org
> Subject: [GENERAL] Trigger
>
> Hi
>
> I am trying to create a trigger for a detail table to check that value
> what is entered exists in master table.
> For example into CustomerOrder table could not be enterd order for
> Customer what does not exists.
>
> How is it best done in PostgreSQL?
>
> I believe a trigger is what I must do.
> I looked the documentation in the part of triggers and there was an
> trigger example what had a part:
> execute procedure procedurename
> Does this mean that I should create a procedure for each trigger?
> Going further I found no Create Procedure in the documentation ... so
> how to create procedures in PostgreSQL?
>
>
> Maybe, somebody could send me some example trigger for checking detail
> record value's existance in master table.
>
> Sorry, for simple question, but I just started using PostgreSQL.
>
>
> Thanks
> Raigo
> raigo.lukk@ttu.ee
>
>
> ************
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: andrzej.mazurkiewicz@polkomtel.com.pl, l950681@ttu.ee
Subject: Re: [GENERAL] Trigger
In-Reply-To: <13288F4408ADD11186FF0060B06A431303648CA2@MSGWAW1>
References: <13288F4408ADD11186FF0060B06A431303648CA2@MSGWAW1>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox