Dnia 2003-06-13 03:26, Uz.ytkownik [EMAIL PROTECTED] napisa?:
hi folks,
i'd like to write an rule which fills out some empty attrs on
insert (w/ data from other given attrs).
the table structure is:
CREATE TABLE foo (start date, duration integer, endtime date);
and the rule is:
CREATE RULE foo1
Tom Lane wrote:
[EMAIL PROTECTED] writes:
i'd like to write an rule which fills out some empty attrs on
insert (w/ data from other given attrs).
You'd be better off doing this with a BEFORE INSERT trigger.
The only way to do it with rules would be to create a view over the
basetable, create an in
[EMAIL PROTECTED] writes:
> i'd like to write an rule which fills out some empty attrs on
> insert (w/ data from other given attrs).
You'd be better off doing this with a BEFORE INSERT trigger.
regards, tom lane
---(end of broadcast)--
hi folks,
i'd like to write an rule which fills out some empty attrs on
insert (w/ data from other given attrs).
the table structure is:
CREATE TABLE foo (start date, duration integer, endtime date);
and the rule is:
CREATE RULE foo1 AS ON INSERT TO foo WHERE new.endtime = NULL DO
INSERT