title: Dynamically exclude some fields from select using EXCEPT
body: <p>We are looking for a way to dynamically exclude some columns from the result set, we tried using a case expression, but EXCEPT doesn't like it:</p>
  
  <pre><code>DECLARE hide_city  bool default true;
  select * EXCEPT(case when hide_city then city end) from table
  </code></pre>
  
  <p>Do you know a way to achieve this? or some other ways?</p>