Apparently, under the sheets a PIPELINED function will create SQL types and collection types.
If you run...
and then check USER_TYPES, you'll find that it creates three types prefixed by SYS_PLSQL_, followed by a number (which looks like it corresponds to the OBJECT_ID visible in USER_OBJECTS) and the rest of the identifier.
CREATE OR REPLACE PACKAGE PFP_CONSTANTS_PKG IS
TYPE v_rec IS RECORD
(
v_date DATE,
v_mon NUMBER(2)
);
TYPE v_array IS TABLE OF v_rec;
function dummy return v_array pipelined;
END;
/
So if you find some types with that sort of prefix, you'll be able to track back to the package which created them.
2 comments:
> I learn something new every day
me too, thank YOU
I've had some problems with this implicit object creation in the past. The major one being the record type defined in the package getting out of step with the schema object type. It shouldn't happen, as Oracle should manage it, but it does, and it's very confusing for developers if they don't know what is going on.
As a result, I never use this feature, preferring to explicitly create the relevant database object types. That way they get a decent name also. :)
Cheers
Tim...
Post a Comment