title: What is a "non-SETOF function"?
body: <p>Getting into PL/pgSQL…</p>
  
  <p>I'm still learning the syntax. Sometimes, I'd run into this error message:</p>
  
  <blockquote>
    <p>ERROR: cannot use RETURN QUERY in a non-SETOF function</p>
  </blockquote>
  
  <p>This sounds sort of cryptic and I could not find information in the Postgres documentation. Hence the question:</p>
  
  <ul>
  <li>What's a non-SETOF function?</li>
  </ul>
  
  <p>And likewise, assuming there's such a thing, what's a SETOF function?</p>