RE: [SQL] RV: A little problem updating data with views - Mailing list pgsql-sql

From Michael J Davis
Subject RE: [SQL] RV: A little problem updating data with views
Date
Msg-id 93C04F1F5173D211A27900105AA8FCFC145565@lambic.prevuenet.com
Whole thread Raw
List pgsql-sql
You can create rules that simulate views and allow you to update the
database.  I have not done this myself but have heard they work.  Rules are
more complex that views.  The html documentation has a lot of information
about rules.  Views are implemented in Postgres using rules without the
update capabilities.
-----Original Message-----From:    Chris Bitmead [SMTP:chris.bitmead@bigfoot.com]Sent:    Friday, June 04, 1999 7:25
AMTo:   pgsql-sql@postgreSQL.orgSubject:    Re: [SQL] RV: A little problem updating data with
 
views
I don't believe views are updatable in postgresql.
Jorge Herrera Piñero wrote:> > Hello,> >     We are using PostgreSQL v6.4 and have problems when we want
update>     data throught views.>     When we issue an update statment within a view, always obtain
'UPDATE 0'>     and the data is not updated. We have checked write permissions
on view>     and are right.> >     Any ideas was going wrong?> >     thanks in advance.> > A complete UPDATE test:> >
test=>create table ttest (t varchar(20), n int4);> test=> create view vtest as select t from ttest;> test=> insert into
ttestvalues('asd', 0);> test=> select * from vtest;> t> ---> asd> (1 row)> > test=> grant all on ttest, vtest to
postgres;>CHANGE> > test=> update vtest set t='asdasd';> UPDATE 0
 
-- Chris Bitmeadhttp://www.bigfoot.com/~chris.bitmeadmailto:chris.bitmead@bigfoot.com


pgsql-sql by date:

Previous
From: Chris Bitmead
Date:
Subject: Re: [SQL] Slashdot Query
Next
From: Martin Leja
Date:
Subject: Re: [SQL] Howto convert floats to text?