Re: Updating views : cannot figure out what goes wrong

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: Dirk Cleenwerck <dirk(dot)cleenwerck(at)useitgroup(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Updating views : cannot figure out what goes wrong
Date: 2005-01-07 15:22:17
Message-ID: 20050107071550.A92362@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message sarlav kumar 2005-01-07 17:41:26 moving database to a new partition on disk
Previous Message Peeters Julien 2005-01-07 14:19:44 I'm a beginner