Using view

Started by Secrétariatover 21 years ago4 messagesgeneral
Jump to latest
#1Secrétariat
ets@rolland-fr.com

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

#2Mage
mage@mage.hu
In reply to: Secrétariat (#1)
Re: Using view

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

#3Oliver Elphick
olly@lfix.co.uk
In reply to: Secrétariat (#1)
Re: Using view

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.

#4Stephan Szabo
sszabo@megazone23.bigpanda.com
In reply to: Secrétariat (#1)
Re: Using view

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.