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

Re: Unable to use VIEWS (Ok button remains shaded)

From: Josh Kupershmidt <schmiddy(at)gmail(dot)com>
To: mladen(dot)gogala(at)vmsinfo(dot)com
Cc: Richard Broersma <richard(dot)broersma(at)gmail(dot)com>, joseflores <jose(dot)floresv(at)gmail(dot)com>, "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Unable to use VIEWS (Ok button remains shaded)
Date: 2010-09-17 14:56:50
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On Thu, Sep 16, 2010 at 10:00 PM, Mladen Gogala
<mladen(dot)gogala(at)vmsinfo(dot)com> wrote:
> I always wandered why would anybody want to update a view? View is, by
> definition, a stored query which is executed frequently enough to be given
> its own first name, middle name and a family name.  If the view is being
> updated, the middle name is  F, just as in the case of Bucky Dent. I don't
> see  any database design pattern which would necessitate  updating a view.
> That is a perversion, not unlike putting ketchup on a hot dog.

See C.J. Date's "SQL and Relational Theory", a good read. Page 195,
"SQL and Views: Update Operations" talks about this. Quote:

>>  The Principle of Interchangeability implies that views must be
>>  updatable (i.e., assignable to) ... [snip] ... updates on base relvars can
>>  always fail on integrity constraint violations—and the same is true
>>  for updates on views. In other words, it isn’t that some views are
>>  inherently nonupdatable, but rather that some updates on some
>>  views will fail on integrity constraint violations (i.e., violations of
>>   The Golden Rule).

On page 197 Date gives an excerpt from SQL99 that defines when a view
is updatable, see page 269 of SQL99 here:


In response to


pgsql-novice by date

Next:From: Mladen GogalaDate: 2010-09-17 15:19:22
Subject: Re: Unable to use VIEWS (Ok button remains shaded)
Previous:From: Tom LaneDate: 2010-09-17 13:57:06
Subject: Re: List of User Defined Types?

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