title: Create an immutable clone of concat_ws
body: <p><a href="https://medium.com/@tylercubell/postgres-immutable-concat-in-indexes-d9fe1b94922f" rel="noreferrer">This blog post</a> shows an example of how to create a <code>immutable_concat</code> function in Pg:</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION immutable_concat(VARIADIC "any")
    RETURNS text AS 'text_concat'
    LANGUAGE internal IMMUTABLE
  </code></pre>
  
  <p>I'd like to do the same with <code>concat_ws</code> and the corresponding <code>text_concat_ws</code> does exist, however, the following just crashes the process:</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION immutable_concat_ws(VARIADIC "any")
    RETURNS text AS 'text_concat_ws'
    LANGUAGE internal IMMUTABLE
  </code></pre>
  
  <p>Update: The siguature of <code>immutable_concat_ws</code> should be <code>(glue, *parts)</code>, one glue (text or varchar) and one or more parts (text, varchar or null).</p>
  
  <p>What am I missing here?</p>