title: query has no destination for result data
body: <p>i have table like below   with name student </p>
  
  <pre><code>     S.No    Name 
        1.    Ramesh
        2.    Raju
        3.    SOmu
      -------------
      -------------  etc
  </code></pre>
  
  <p>My requirement is when i am passing the S.no i  will get the Name by using function</p>
  
  <p>My function like below:</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION fn_name(v_sno bigint)
    RETURNS TEXT
    AS
  $BODY$
  
      DECLARE RESULT  VARCHAR(5000);
  
      BEGIN   
          SELECT  RESULT  "Name"  FROM "Student" WHERE "s.no" = v_sno;
  
          RETURN RESULT;
       END;
  
   $BODY$
    LANGUAGE plpgsql
    COST 100;
  ALTER FUNCTION fn_name(bigint)
    OWNER TO postgresql
  </code></pre>
  
  <p>but i  am getting the following error .</p>
  
  <blockquote>
    <p>ERROR: query has no destination for result data<br>
    SQL state: 42601<br>
    Hint: If you want to discard the results of a SELECT, use PERFORM instead.<br>
    Context: PL/pgSQL function fn_name(bigint) line 6 at SQL statement<br></p>
  </blockquote>
  
  <p>please help me how to resolve the above issue. </p>