title: How to add single quotes around a list of columns names?
body: <p>I have a table which has few columns. I got the name of columns by getting it as an array_agg and then array_to_string. Like below:</p>
  
  <pre><code>"hospitalaccountrecord,locationname,patientkey,inpatientadmitdatetime,readmission,no_null_days_btw_admissions,cohort_assignment,admit_mon_feb,admit_mon_mar,admit_mon_apr,admit_mon_may,admit_mon_june,admit_mon_july,admit_mon_aug,admit_mon_sep,admit_mon_oct,a (...)"
  </code></pre>
  
  <p>The code I used was this:</p>
  
  <pre><code>select array_to_string(array_agg(column_name::text), ',') 
  from 
  (
  select column_name 
  from 
  information_schema.columns 
  where table_schema='a' and
  table_name = 'b'
   order by columns.ordinal_position
  ) as v;
  </code></pre>
  
  <p>What I am looking for is the same thing but each column name should be enclosed in ''. Like </p>
  
  <pre><code>'hospitalaccountrecord','locationname','patientkey' 
  </code></pre>
  
  <p>and so on.</p>