title: Can Postgres stored functions have both a return value AND out parameters?
body: <h3>I know Oracle and PL/SQL</h3>
  <p>Compared to what I know about Oracle PL/SQL, I'm not very familiar with PostgreSQL's stored procedures and plpgsql. In Oracle, there are two types of callables:</p>
  <ul>
  <li>Procedures. They can have <strong>IN</strong>, <strong>OUT</strong> and <strong>IN OUT</strong> parameters, but no return values</li>
  <li>Functions. They can have <strong>IN</strong>, <strong>OUT</strong> and <strong>IN OUT</strong>  parameters and they <em>MUST</em> return a value</li>
  </ul>
  <h3>But I'm new to plpgsql</h3>
  <p>I understand that in plpgsql, all stored procedures are considered <code>functions</code>. To my understanding, this means, they can (but don't have to) always return a value. Now I see on the <a href="http://www.postgresql.org/docs/current/static/plpgsql-declarations.html" rel="nofollow noreferrer">documentation page</a>, that I can also declare <strong>OUT</strong> parameters on functions<s>, a thing that's not possible in Oracle</s>. But I don't see an example or any clear statement about whether <strong>OUT</strong> parameters can be combined with return values. Neither can I see whether <strong>IN OUT</strong> parameters are possible.</p>
  <h3>So these are my questions:</h3>
  <ul>
  <li>Does plpgsql allow <strong>IN OUT</strong> parameters?</li>
  <li>Does plpgsql allow <strong>OUT</strong> parameters to be combined with return values? Is this a common practice? Do you have examples for that?</li>
  </ul>