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

From Chris Bitmead
Subject Re: [SQL] RV: A little problem updating data with views
Date
Msg-id 3757D393.EBDA5B70@bigfoot.com
Whole thread Raw
In response to RV: A little problem updating data with views  ("Jorge Herrera Piñero" <jhpinero@ull.es>)
Responses Re: [SQL] RV: A little problem updating data with views
List pgsql-sql
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 ttest values('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 Bitmead
http://www.bigfoot.com/~chris.bitmead
mailto:chris.bitmead@bigfoot.com


pgsql-sql by date:

Previous
From: "Jorge Herrera Piñero"
Date:
Subject: RV: A little problem updating data with views
Next
From: Tom Lane
Date:
Subject: Re: [SQL] RV: A little problem updating data with views