title: How to retrieve the comment of a PostgreSQL database?
body: <p>I recently discovered you can <a href="http://www.postgresql.org/docs/current/static/sql-comment.html">attach a comment</a> to all sort of objects in PostgreSQL.  In particular, I'm interested on playing with the comment of a database.  For example, to <strong>set</strong> the comment of a database:</p>
  
  <pre><code>COMMENT ON DATABASE mydatabase IS 'DB Comment';
  </code></pre>
  
  <p>However, what is the opposite statement, to <strong>get</strong> the comment of <code>mydatabase</code>?</p>
  
  <p>From the <code>psql</code> command line, I can see the comment along with other information as a result of the <code>\l+</code> command; which I could use with the aid of awk in order to achieve my goal.  But I'd rather use an SQL statement, if possible.</p>