title: use set language in a sql function
body: <p>I want to use <code>DATENAME</code> in a function, but the problem is datename's result is dependent on login or install language setup.</p>
  
  <p>to make sure all the time it return english result I need to use <code>set language 'English'</code> but if I use it inside a function I will get following error </p>
  
  <blockquote>
    <p>Invalid use of a side-effecting operator 'SET COMMAND' within a function.</p>
  </blockquote>