From: Ricky <ricky@babonmultimedia.com>
To: postgre <pgsql-odbc@postgresql.org>
Subject: trigger or rule?
Date: Tue, 6 Jan 2004 18:54:12 +0800
Message-ID: <011801c3d462$c3019450$0200a8c0@bandeng> (raw)
hello,
i want to ask a simple question.
i tried to make validation in postgre when data = NULL then data will be
changed into 0
so what should i do? using rule or trigger ?
i already tried using rule :
CREATE RULE synsellingprice_kosongtozero AS ON UPDATE TO synsellingprice DO
UPDATE synsellingprice SET sellingprice = 0 WHERE (synsellingprice.productid
= new.productid); when i tried to update, then error said 1"ERROR: query
rewritten 100 times, may contain cycles"
pls give me advices
Thanks you very much
Ricky
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-odbc@postgresql.org
Cc: ricky@babonmultimedia.com
Subject: Re: trigger or rule?
In-Reply-To: <011801c3d462$c3019450$0200a8c0@bandeng>
References: <011801c3d462$c3019450$0200a8c0@bandeng>
* 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