title: Postgres: Refer to CTE alias within function
body: <p>I want to do something like this:</p>
  
  <pre><code>...
  with blocking_index as (
    (select * from exact_phone_matches) union all (select * from 
     exact_email_matches)
  ), 
  matched_names as (
    select * from get_matches((_rec.name, 'blocking_index')
    )
  )
  ...
  </code></pre>
  
  <p>i.e. I want to pass the reference to my CTE alias ('blocking_index') into a function. This function contains something like this:</p>
  
  <pre><code>return query execute format('select * from %s where %s', _table, _whr)
  </code></pre>
  
  <p>This doesn't work. Is there any other way I can do this?</p>