db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John English <john.fore...@gmail.com>
Subject Re: Views dropped automatically when altering tables?
Date Tue, 07 Feb 2012 16:19:22 GMT
On 07/02/2012 16:43, Rick Hillegas wrote:
> Hi John,
> This is one of many areas where Derby's dependency tracking could be
> improved. I think that Derby is over-aggressive in dropping views when
> you drop a column in the underlying table.As I read the SQL Standard
> (part 2, section 11.19 <drop column definition>), a RESTRICTed column
> drop does not need to affect views which don't reference the column.

My copy of SQL-92 has this as section 11.15, and according to General 
Rules (2) in this section:

   "Let VN be the name of any view that contains a reference to
    column C of table T. The following <drop view statement> is
    effectively executed with a current <authorization identifier>
    of "_SYSTEM" and without further Access Rule checking:


This seems a bit peculiar to me, as silent unasked-for behaviour 
generally leads to trouble in my experience. But it seems that this
is indeed mandated by the standard... The over-aggressive behaviour
of Derby just means you're even less sure than usual what gets hosed
automatically when you drop a column!

Thanks for pointing me to the appropriate section of a document I find
rather dense at times... :-)

  John English | My old University of Brighton home page is still here:
               | http://www.cem.brighton.ac.uk/staff/je/

View raw message