title: Cast Const Integer to Bigint in Postgres
body: <p>I'm getting the below error while running the below script.  My goal is to create a function in Postgres to return 1 as a bigint.  Help please!</p>
  
  <p>hashtagpostgresnoobie</p>
  
  <blockquote>
    <p>ERROR:  function result type must be bigint because of OUT parameters</p>
  </blockquote>
  
  <pre><code>CREATE OR REPLACE FUNCTION GetNumberOne(
      OUT numberone bigint)
    RETURNS SETOF record AS
  $BODY$
  
      SELECT CAST(1 AS BIGINT) AS "NUMBERONE";
  
  $BODY$
    LANGUAGE sql VOLATILE;
  </code></pre>