Re: Updating views : cannot figure out what goes wrong - Mailing list pgsql-novice

From Stephan Szabo
Subject Re: Updating views : cannot figure out what goes wrong
Date
Msg-id 20050107071550.A92362@megazone.bigpanda.com
Whole thread Raw
In response to Updating views : cannot figure out what goes wrong  (Dirk Cleenwerck <dirk.cleenwerck@useitgroup.com>)
List pgsql-novice
On Fri, 7 Jan 2005, Dirk Cleenwerck wrote:

> First of all i'm using the postgresql 8.0rc2 on windows
>
> I have a problem updating views and seem to be stuck.
> My front-end to postgresql is ms-access and i have the following code in
> my VBA
>
> strSql = "CREATE VIEW bondetailtmp AS SELECT * FROM bondetail WHERE
> subbonnr=" & Forms!bonnentest!bonnr & ";"
> cn.Execute strSql
> strSql = "CREATE RULE bondetailtmpupd AS ON UPDATE TO bondetailtmp " & _
>         "DO INSTEAD NOTHING;"
> cn.Execute strSql
> strSql = "CREATE RULE bondetailtmpupd2 AS ON UPDATE TO bondetailtmp " & _
>         "WHERE OLD.subbonbeschrijving <> NEW.subbonbeschrijving " & _
>         "DO (UPDATE bondetail " & _
>         "SET subbonbeschrijving=NEW.subbonbeschrijving);"

I think you'll need to give more details or a standalone example, because
making up a simple bondetail (holding just the columns necessary for
the view and rule to work) and making the view and rules above did not
error on an update.

pgsql-novice by date:

Previous
From: Peeters Julien
Date:
Subject: I'm a beginner
Next
From: sarlav kumar
Date:
Subject: moving database to a new partition on disk