Rules and Views

From: "Travis Hoyt" <thoyt(at)npc(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Rules and Views
Date: 2001-10-09 13:24:26
Message-ID: 3BC2FA8A.DF7B0744@npc.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
thoyt.vcf text/x-vcard 304 bytes

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2001-10-09 13:57:39 Re: Rules and Views
Previous Message Stoffel van Aswegen 2001-10-09 09:30:55 JDBC ResultSet