Rules and Views - Mailing list pgsql-novice

From Travis Hoyt
Subject Rules and Views
Date
Msg-id 3BC2FA8A.DF7B0744@npc.net
Whole thread Raw
Responses Re: Rules and Views
List pgsql-novice
Can anyone give me a clue as to how to get rules working with views?  I
have a large table I call 'sardata' and several views, an example of
which is 'sun_u'.  What I want to do is insert data into 'sun_u' and
have it in turn actually update the 'sardata' table.  I've looked at the
examples on the postgresql web page but when I try those examples it
complains, saying "Attribute 'usr' not found" with 'usr' being my first
column.  Here is a copy of one of my attempts:

create rule ins_sun_u as on insert
sarweb-> to sun_u do instead insert into sardata values ( usr, sys, wio,
idle, time, systemid );
ERROR:  Attribute 'usr' not found

Any help would be greatly appreciated.

Thanks,

Travis

Attachment

pgsql-novice by date:

Previous
From: Stoffel van Aswegen
Date:
Subject: JDBC ResultSet
Next
From: Tom Lane
Date:
Subject: Re: Rules and Views