title: ERROR: query has no destination for result data
body: <pre><code>CREATE OR REPLACE FUNCTION _chkLogin(userid varchar, pwd varchar)
  RETURNS BOOLEAN AS
  $BODY$
  DECLARE 
   passed BOOLEAN;
  BEGIN
   SELECT  (_password = $2) FROM _vRegistration WHERE _userid = $1;
   RETURN passed;
  END;
  $BODY$
  LANGUAGE 'plpgsql';
  </code></pre>
  
  <p>When am executing the code above am getting the following error, </p>
  
  <pre><code>SELECT _chkLogin('username','abcd') as passed;
  </code></pre>
  
  <blockquote>
    <p>ERROR: query has no destination for
    result data</p>
  </blockquote>
  
  <p>I've used perform then i get a different problem,</p>
  
  <pre><code>PERFORM _chkLogin('username','abcd');
  </code></pre>
  
  <blockquote>
    <p>ERROR: syntax error at or near
    "perform"</p>
  </blockquote>
  
  <p>Suggest me what should I be doing in order to overcome this error.</p>