title: Convert a query result to hstore
body: <p>I am using PostgreSQL 9.4. I need to convert subquery to hstore.
  I have this query: <code>select code, value_string from dir</code>. It returns</p>
  
  <pre><code>code  | value_string
  ------|--------------
  CODE  | 1
  ACC   | 2
  ...
  </code></pre>
  
  <p>How to convert his result to <code>hstore('"ACC"=&gt;"2", "CODE"=&gt;"1", ...')</code>?</p>
  
  <p>I am looking something like this: <code>SELECT hstore(select code, value_string from dir)</code>.</p>