title: How can I get the distinct values of all columns in a single table in Postgres?
body: <p>Ideally I'd like to run a single query that returns a table where each row is a column name of a specified table, and <code>jsonb</code> array of all the distinct values in the table corresponding to that column.</p>
  
  <p>The tricky part seems to be doing so dynamically, where I can specify just the table and not each individual column.</p>
  
  <p>I can retrieve all the column names of the relevant table from <code>information_schema.columns</code>, but is there an easy way to couple this with a query to retrieve all the distinct values for each column?</p>