title: PostgreSQL GOTO bak in function
body: <p>I have function like</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION task_manager(task integer, params text)
     RETURNS integer AS $$
  BEGIN
  IF task = 1 THEN
    &lt;&lt;lab1&gt;&gt;
    -- some work 1
  ELSIF task = 2 THEN
    -- some work 2
  
    -- need to exec 'some work 1'
    GOTO lab1;
  END IF;
  
  RETURN null;
  END;
  $$ LANGUAGE plpgsql;
  </code></pre>
  
  <p>GOTO not workking due GOTO syntax.</p>
  
  <p>Any way to do this?</p>