The user who creates an owner-privileged UDR, rather than the user who executes the UDR, owns any database objects that are created by the UDR when the UDR is executed, unless another owner is specified for the created object.
For example, assume that user mike creates this user-defined function:
CREATE FUNCTION func1 () RETURNING INT; CREATE TABLE tab1 (colx INT); RETURN 1; END FUNCTION
If user joan now executes function func1, user mike, not user joan, is the owner of the newly created table tab1.
In the case of a DBA-privileged UDR, however, the user who executes a UDR (rather than the UDR owner) owns any database objects created by the UDR, unless another owner is specified for the database object within the UDR.
For example, assume that user mike creates this user-defined function:
CREATE DBA FUNCTION func2 () RETURNING INT; CREATE TABLE tab2 (coly INT); RETURN 1; END FUNCTION;
If user joan now executes function func2, user joan, not user mike, is the owner of the newly created table tab2.
See also the section Support for Roles and User Identity.
Related statements: ALTER FUNCTION , ALTER ROUTINE, CREATE PROCEDURE, CREATE FUNCTION FROM , DROP FUNCTION , DROP ROUTINE , GRANT, EXECUTE FUNCTION , PREPARE, REVOKE, and UPDATE STATISTICS
SPL Statements of this manual describes the SPL language. For a discussion of how to create and use SPL routines, see the IBM Informix Guide to SQL: Tutorial.
For a discussion of how to create and use external routines, see IBM Informix User-Defined Routines and Data Types Developer's Guide. For information about how to create C UDRs, see the IBM Informix DataBlade API Programmer's Guide.