trigger or rule? - Mailing list pgsql-odbc

From Ricky
Subject trigger or rule?
Date
Msg-id 011801c3d462$c3019450$0200a8c0@bandeng
Whole thread Raw
List pgsql-odbc
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


pgsql-odbc by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: Bug correction
Next
From: "Guy Steven"
Date:
Subject: No Current Record