title: PostgresQL Error: relation <table> doesn't exist
body: <p>I'm new to Postgres and plpsql, so sorry if the answer is obvious. However I wasn't able to figure out what I'm doing wrong here. When I use the sample  DB function, everything is fine. When I try to create my own: </p>
  
  <pre><code>CREATE OR REPLACE FUNCTION get_trans (p_param VARCHAR) 
    RETURNS TABLE (
      amount money,
      transactionId UUID
    ) 
    AS $$
    BEGIN
      RETURN QUERY SELECT
        amount,
        transactionId
      FROM
      transactions;
    END; $$ 
  
  LANGUAGE 'plpgsql';
  </code></pre>
  
  <p>The function executes, but testing it by running the following test statement fails: </p>
  
  <pre><code>SELECT * 
  FROM public.get_trans(
    'bs'
  )
  </code></pre>
  
  <p>with this error:</p>
  
  <pre><code>ERROR:  relation "public.transactions" does not exist
  LINE 4:  FROM public.transactions
            ^
  QUERY:  SELECT
            amount,
            transactionId
  FROM public.transactions
  CONTEXT:  PL/pgSQL function get_trans(character varying) line 4 at RETURN 
  QUERY
  SQL state: 42P01
  </code></pre>
  
  <p>It looks like it's a pretty common error with plpsql, and I realize that I'm probably missing smth obvious, but none of the answers so far helped in my case.  is a straight forward stand-along table with only primary key for now. </p>
  
  <p>Any tips are highly appreciated.</p>
  
  <p>UPDATE: So, thanks to LD I found out that my table although created doesn't exist in any schema due to syntax errors. It turned out postgres is more different from  MSSQL as I thought, and harder to flash out script errors. The main error was - you can't use camel-case in table or column definition. Once I fixed those and rerun the function, everything as fine. </p>