Subject RE: [firebird-support] Read-Only View
Author Helen Borrie
At 10:08 PM 25/03/2011, Peter Gore wrote:
>Thanks for your input so far. But my point is that, according to the
>Firebird Book (my bible) states on page 493, that a view will be
>read-only if its SELECT statement has any of the following
>characteristics:
>
>* Specifies a row quantifier other than ALL ....
>* Contains fields defined by subqueries or other expressions
>* Contains Fields defined by aggregating functions....
>* Includes UNION ....
>* Joins multiple tables
>* Does not include all NOT NULL columns from....
>* Selects from a non-updateable view.
>
>
>
>My query has none of the above characteristics so I would expect it to
>be naturally updateable. I therefore assume this is a bug (which I have
>already entered into the tracker)

At the time the book was written (v.1.5), ORDER BY was not valid in a view definition. Since then, somewhere, it has crept in undocumented. Ann has pointed out that it entered the SQL standard at some point.

I would expect a view containing ORDER BY to be not naturally updatable, since an ordered set is not a natural set.

Please don't top-post.

^ hb ^