pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris Bitmead <chris.bitmead@bigfoot.com>
To: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] RV: A little problem updating data with views
Date: Fri, 04 Jun 1999 23:24:35 +1000
Message-ID: <3757D393.EBDA5B70@bigfoot.com> (raw)
References: <007401beae8c$c020ebb0$ca7c91c1@mercedes.ccti.ull.es>

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



view thread (5+ messages)  latest in thread

Message-ID: <3757D393.EBDA5B70@bigfoot.com>
Permalink:  ../3757D393.EBDA5B70@bigfoot.com/
Also on:    postgresql.org/message-id/3757D393.EBDA5B70@bigfoot.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: chris.bitmead@bigfoot.com
  Subject: Re: [SQL] RV: A little problem updating data with views
  In-Reply-To: <3757D393.EBDA5B70@bigfoot.com>
  References: <007401beae8c$c020ebb0$ca7c91c1@mercedes.ccti.ull.es> <3757D393.EBDA5B70@bigfoot.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox