Skip site navigation (1) Skip section navigation (2)

Re: Update-able View linked to Access

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Update-able View linked to Access
Date: 2006-12-12 04:24:55
Message-ID: 610562.34714.qm@web31801.mail.mud.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-odbc
> It seems almost impossible for the driver to solve the problems perfectly.
> Essentially it's a problem of the rule system.

Yes, I was able to reproduce these bad results from within psql.  I take it that this is a well
know limitation of the rule system or should I try reporting it with my simple test case?  Now
that I've finially learned to implement rules on a view, now I am deeply concerned about their
relablility.  As you mentioned, the fact that I can get inconsistant updates makes me very
concerned.  I guess they are okey as long as you specify explicit queries that only reference
single column's primary key id, or if the view doesn't span multiple tables.  

My next question, is it possible to create an updatable view using triggers on a instead of rules?
:-) If so, I guess my next task is to learn about plpgsql and triggers. 


postgres=# select * from vwife;
 id |  name   | dresssize
----+---------+-----------
  3 | dodie   |        13
  4 | heather |        10
  2 | katie   |        11
(3 rows)

postgres=# update vwife 
           set name = 'Katheryn', 
               dresssize = 12 
           where (id,name,dresssize)=(2,'katie',11);
UPDATE 0

postgres=# select * from vwife;
 id |   name   | dresssize
----+----------+-----------
  3 | dodie    |        13
  4 | heather  |        10
  2 | Katheryn |        11
      ^^^^^^^^  <--  update 0 is false 
(3 rows)

Partial updates is a very bad thing.

Regards,

Richard Broersma Jr.

In response to

Responses

pgsql-odbc by date

Next:From: Hiroshi InoueDate: 2006-12-12 08:19:26
Subject: Re: Update-able View linked to Access
Previous:From: noreplyDate: 2006-12-12 03:54:15
Subject: [ psqlodbc-Bugs-1000714 ] Driver gets progressively slower Multi-threading retrieval

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group