title: How to pass text parameter to stored function for `IN` operator
body: <p>I need obtain table names from schema, except some tables</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION  func(unnecessary_tables TEXT)
  returns void
  as $$
  begin
        EXECUTE 'SELECT table_name FROM information_schema.tables   
        WHERE 
        table_schema=''public''
        AND 
        table_name NOT IN( $1 )
        ' USING unnecessary_tables
  
        --here execute retrieved result, etc ...
  
  end;
  $$language plpgsql
  </code></pre>
  
  <p>Then call function</p>
  
  <pre><code>select func('table1'',''table2');
  </code></pre>
  
  <p>This not works and returns in result  <code>table1</code> and <code>table2</code> also.</p>
  
  <p>Question is: How to pass text parameter to stored function, for <code>IN</code> operator ?</p>