title: how to select a constant value combined with subquery that returns multiple values?
body: <p>If I have a table like this:</p>
  
  <pre><code>CREATE TABLE foo (
      id INTEGER,
      name VARCHAR
  );
  </code></pre>
  
  <p>and run this query:</p>
  
  <pre><code>SELECT 1, (SELECT name FROM foo);
  </code></pre>
  
  <p>I expect the result to look something like this:</p>
  
  <pre><code>1    John
  1    Jack
  1    Jane
  ...
  </code></pre>
  
  <p>but instead I get an error</p>
  
  <pre><code>[21000] ERROR: more than one row returned by a subquery used as an expression
  </code></pre>
  
  <p>How can I make this work? PostgreSQL 10 if that matters.</p>
  
  <p>UPDATE: The subquery is necessary, because it's a simplified case of a more complicated one.</p>