"Travis Hoyt" <thoyt(at)npc(dot)net> writes:
> create rule ins_sun_u as on insert
> to sun_u do instead insert into sardata values ( usr, sys, wio,
> idle, time, systemid );
> ERROR: Attribute 'usr' not found
You need to write "new.usr", etc. Essentially, "new" and "old" are
record variables referring to the about-to-be-inserted row (in INSERT
or UPDATE rules) and the about-to-be-deleted row (in UPDATE or DELETE).
Even though sun_u is a view not a real table, you still have to follow
the syntax...
regards, tom lane