title: PostgreSQL unable to INSERT INTO
body: <p>I want to reflect info from one table into another one. Ideally, I would need to use a function (will be upgrading afterwards). I have a first table called tb_user, with data from users (simple user names such as <code>U0001, U0002</code>....).</p>
  <p>I was doing the following:</p>
  <pre><code>CREATE TABLE tb_user_statshot    (
      user_code                       CHARACTER(5) NOT NULL
  );
  
  CREATE OR REPLACE FUNCTION sp_calculatet() RETURNS void AS 
  $$
  DECLARE 
  BEGIN
      INSERT INTO tb_user_statshot (user_code)
      SELECT user_code FROM tb_user;
  END;
  $$ language 'plpgsql';
  </code></pre>
  <p>I expect the users code to reflect in my new <code>statshot</code> table, but this is no happening. Does anyone know why?</p>
  <p>Thank you!</p>