Deferred name resolution in UDF
Actually deferred name resolution is about tables in stored procedures. But I noted that sometime I CAN create UDF which refers to not-existent UDF, in other cases I CAN NOT. I didn't find any mention when not-existent UDF names allowed and when they are not.
It doesn't depend on UDF type (scalar/table-valued). Looks like if UDF returns XML it doesn't allow referenc开发者_高级运维es to not-existent UDFs.
So I'm confused little bit. Is there any rules?
P.S. These views haven't been bound to the schema, no SCHEMABINDING
The obvious reason why deferred name resolution wouldn't work is if the function is created with the "WITH SCHEMABINDING" option. Because this option causes entries to be made in the system tables, so that you cannot drop objects the function depends on, it will fail if the dependent object doesn't exist.
精彩评论