title: Is it possible to use json_populate_recordset in a subquery?
body: <p>I have a json array with a couple of records, all of which have 3 fields lat, lon, v.</p>
  
  <p>I would like to create a select subquery from this array to join with another query. The problem is that I cannot make the example in the <a href="https://www.postgresql.org/docs/9.3/static/functions-json.html" rel="nofollow noreferrer">PostgreSQL documentation</a> work.</p>
  
  <pre><code>select * from json_populate_recordset(null::x, '[{"a":1,"b":2},{"a":3,"b":4}]')
  </code></pre>
  
  <p>Should result in:</p>
  
  <pre><code> a | b
  ---+---
   1 | 2
   3 | 4
  </code></pre>
  
  <p>But I only get <strong>ERROR: type "x" does not exist Position: 45</strong></p>