Vantage automatically removes the associated observer and mutator methods for each attribute that you drop.
The following rules apply to dropping attributes.
- The specified UDT must be a structured type.
- The specified UDT must not be referenced by any other database object.
An attempt to drop an attribute from a UDT being referenced by some other database object, such as being used as the column data type of any table, the system returns an error to the requestor.To be explicit, any of the following conditions cause the request to abort.
- There is a table in any database for which the data type of one of the columns is the specified UDT.
- There is a structured UDT for which the data type of one of the attributes is the specified UDT.
- The specified UDT is referenced in a user-defined cast.
- There is a method or UDF in any database that references the specified UDT.
- There is an ordering or transform group defined for the UDT.
- The attribute to be dropped must not be the only attribute of the UDT.
As a UDT developer, you are responsible for performing all the necessary cleanup on all of the following database objects before you drop any attributes from a structured UDT.
- Casts associated with the UDT.
- Orderings for the UDT.
- Transforms for the UDT.
- Tables whose columns are typed with the UDT.
- Structured UDTs that use the UDT.
- UDFs and methods that use the UDT as a parameter type.
You can drop attributes from a structured UDT definition even if any of the following database objects references the observer or mutator methods associated with that attribute.
However, when you attempt to execute any of the affected database objects, the system returns an error to the requestor.