title: PostgreSQL: How to list all available datatypes?
body: <p>Question:</p>
  
  <p>In PostgreSQL (<strong>using SQL, not the console</strong>), how can I list all available datataypes ?</p>
  
  <p>Ideally like this:
  <a href="http://www.java2s.com/Code/PostgreSQL/Postgre-SQL/Displaysalldatatypesintheconnecteddatabasewithcomments.htm" rel="noreferrer">http://www.java2s.com/Code/PostgreSQL/Postgre-SQL/Displaysalldatatypesintheconnecteddatabasewithcomments.htm</a></p>
  
  <p>It should also list user defined types, if there are any.<br />
  Just like the list in pgAdmin3 where you define the datatype for a new column in a table.</p>