title: Query with regexp_matches in select returns empty result set
body: <p>I have following SQL:</p>
  
  <pre><code>SELECT code, name
  ARRAY_TO_JSON(regexp_matches(code, '^(.*?)(24)(.*)$','i')) AS match_code,
  ARRAY_TO_JSON(regexp_matches(name, '^(.*?)(24)(.*)$','i')) AS match_name
  FROM manufacturer
  WHERE (code  ~* '^(.*?)(24)(.*)$' OR name  ~* '^(.*?)(24)(.*)$')
  ORDER BY name;
  </code></pre>
  
  <p>There's following record in the table:</p>
  
  <pre><code>code | name
  -------------
  24   | Item 24
  </code></pre>
  
  <p>The result of the query is:</p>
  
  <pre><code>code | name    | match_code   | match_name
  -------------------------------------------------
  24   | Item 24 | ["","24",""] | ["Item ","24",""]
  </code></pre>
  
  <p>Then I replaced string '24' by 'Item' in the query and I expect this result:</p>
  
  <pre><code>code | name    | match_code   | match_name
  -------------------------------------------------
  24   | Item 24 | []           | ["", "Item ","24"]
  </code></pre>
  
  <p>BUT the result is:</p>
  
  <pre><code>Empty result set
  </code></pre>
  
  <p>Function regexp_matches probably returns no row if it doesn't match.</p>
  
  <p>How can I fix the query so that it returns rows even when regexp_matches doesn't match?</p>
  
  <p>Thanks in advance.</p>