title: How to select all rows from refcursor returned by PL/pgSQL function?
body: <p>I have a function some_func() that returns <code>refcursor</code>:</p>
  
  <pre><code>CREATE OR REPLACE FUNCTION some_func() RETURNS refcursor AS (...)
  </code></pre>
  
  <p>I want to call this function from console and display the result set from the cursor returned by it. In Oracle I would write:</p>
  
  <pre><code>SELECT * FROM TABLE(some_func());
  </code></pre>
  
  <p>What is the equivalent of that construction on PosgreSQL?</p>