maandag, mei 08, 2006

Invalid data type in view columns - 10gR2

Some views that were completely valid and usable in 10gR1 - and compiled without errors in 10gR2 did cause some peculiar errors in packages that depended on them. Even a normal select * from the_view failed.


ORA-06552: PL/SQL: Compilation unit analysis terminated
ORA-06553: PLS-201: identifier 'UNDEFINED' must be declared

After a quick review I found that the - generated - view definition was different than I normally do:

create view x (a,b,c) as select a,b,c,d,e,f from y;

I am not sure about a bug (10.2.0.2) but it certainly is different behaviour than it used to be. A little tweek of the code made the view usable again:

create view x (a,b,c) as select a,b,c from y;