Thread: Using view

Using view

From
Secrétariat
Date:
Hello !
Why can't I update data when I use a VIEW instead of a TABLE ?
How can I do similar action ?
Thanks.
Luc
 

Re: Using view

From
Mage
Date:
Secrétariat wrote:

> Hello !
> Why can't I update data when I use a VIEW instead of a TABLE ?
>
Why can't you drive home if you drink whisky instead of coca-cola?

Read the Manual Chapter 34 about the rule system.

       Mage


Re: Using view

From
Oliver Elphick
Date:
On Fri, 2004-07-30 at 09:17, Secrétariat wrote:
> Hello !
> Why can't I update data when I use a VIEW instead of a TABLE ?

Because a view is not a table.  Many views are inherently non-updatable,
and the backend assumes that all are.

> How can I do similar action ?

Create a rule on the view to update the base table(s) instead.



Re: Using view

From
Stephan Szabo
Date:
On Fri, 30 Jul 2004, [iso-8859-1] Secr�tariat wrote:

> Why can't I update data when I use a VIEW instead of a TABLE ?
> How can I do similar action ?

We require explicit rules to be made for updating the view.  Technically
there's a very small set of views for which we would need to make the
rules automatically to be spec complient, but those views are really
limited, IIRC, no joins, no group by, no set functions, no aggregates, and
some other limitations.  It'd be nice to be able to handle more
complicated cases automatically, but it's non-trivial.