Home Dashboard Directory Help
Search

Document the Requirement for SchemaBinding on Deterministic User-Defined Functions by CouldYouMakeHelpingYouAnyMorePainful


Status: 

Closed
 as Fixed Help for as Fixed


1
0
Sign in
to vote
Type: Suggestion
ID: 800991
Opened: 9/16/2013 12:34:21 PM
Access Restriction: Public
0
Workaround(s)
view

Description

The documentation for CREATE FUNCTION does not indicate that user-defined functions lacking WITH SCHEMABINDING will always be non-deterministic. For example:

create function MyPi()
returns float
begin
return 3.14159265358979324
end

would appear to the unitiated to be deterministic, i.e. it will always return the same result for the same (unsupported) input. In fact, without adding WITH SCHEMABINDING it remains non-deterministic according to INFORMATION_SCHEMA.ROUTINES.
Details
Sign in to post a comment.
Posted by Microsoft on 10/28/2013 at 8:17 AM
Thank you for submitting this. I have added the requirement "Functions must be created with schema binding to be deterministic." in the appropriate section of CREATE FUNCTION (Transact-SQL). This will show up in the MSDN version in a week or two.
Posted by Microsoft on 10/3/2013 at 6:44 PM
Thanks for calling this to our attention. We're investigating and will post an update shortly.
Sign in to post a workaround.