title: plpgsql text[] varchar[] array not working
body: <p>My purpose is assigning the name of the tables into an array and drop them in the <code>foreach</code> loop via this array.</p>
  
  <p>I am actually trying to do something more complicated but before I try to get the following code working:</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION delete_auto()
    RETURNS void AS
  $BODY$DECLARE
  t text;
  tbl_array text[] = array["ID: 889197824 CH: 0006 Messdaten2","ID: 889197824 CH: 0006 Messdaten3","ID: 889197824 CH: 0006 Messdaten4"];
  BEGIN 
  
  FOREACH t IN ARRAY tbl_array LOOP
  DROP TABLE t;
  END LOOP;
  END; $BODY$
    LANGUAGE plpgsql VOLATILE
    COST 100;
  ALTER FUNCTION delete_auto()
    OWNER TO postgres;
  </code></pre>
  
  <p>Function seems to me pretty correct but it does not drop the tables, does nothing actually after I execute it. I just get such an error on the log:</p>
  
  <pre><code>Table Â»tÂ« does not exist. 
  </code></pre>
  
  <p>I have also tried the same code with varchar[] instead of text[] but not working either. Any help would be appreciated</p>