postgresql function insert multiple rows which values are represented by array <p>I have the table:</p> <pre><code>--------------------------------------- id (integer) | name (character varying) --------------------------------------- </code></pre> <p>I want to insert multiple rows represented by array of character varying. I have the function code:</p> <pre><code>create or replace function add_task_state( TEXT ) returns void as $$ declare _str_states character varying[]; begin _str_states = string_to_array($1,','); insert into task_states (name) values ???; end; $$ language plpgsql; </code></pre> <p>How I can do this?</p>