Received: from tech.com.au (IDENT:root@techpt.lnk.telstra.net [139.130.75.122]) by hub.org (8.9.3/8.9.3) with ESMTP id JAA82481 for ; Fri, 4 Jun 1999 09:24:57 -0400 (EDT) (envelope-from chris.bitmead@bigfoot.com) Received: from bigfoot.com (chris@localhost [127.0.0.1]) by tech.com.au (8.8.7/8.8.7) with ESMTP id XAA20813 for ; Fri, 4 Jun 1999 23:24:36 +1000 Sender: chris@tech.com.au Message-ID: <3757D393.EBDA5B70@bigfoot.com> Date: Fri, 04 Jun 1999 23:24:35 +1000 From: Chris Bitmead X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.2.9 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-sql@postgreSQL.org Subject: Re: [SQL] RV: A little problem updating data with views References: <007401beae8c$c020ebb0$ca7c91c1@mercedes.ccti.ull.es> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit 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