title: Returning a specific value if a joined row doesn't exist in a SELECT statement using PostgreSQL
body: <p>I have two PostgreSQL tables containing:</p>
  
  <ol>
  <li>some objects</li>
  <li>some data about the objects with the type of data</li>
  </ol>
  
  <p>For example:</p>
  
  <pre><code>    |---ID---|---NAME---|
      |   1    |  name1   |
      |   2    |  name2   |
      |   3    |  name3   |
  
      |---ID_OBJ---|---TYPE---|---VALUE---|
      |      1     |  type_1  |    val1   | 
      |      1     |  type_2  |    val2   | 
      |      2     |  type_1  |    val3   | 
      |      3     |  type_2  |    val4   |
  </code></pre>
  
  <p>I want to obtain all the information about each objects on one line. The problem is that I want the values of the nonexistent rows too :</p>
  
  <pre><code>    |---NAME---|---TYPE1---|---TYPE2---|
      |  name1   |    val1   |    val1   |
      |  name2   |    val3   |     NA    |
      |  name3   |     NA    |    val4   |
  </code></pre>
  
  <p>I don't really understand how to proceed to get this unexistant relationships. Is the <code>EXISTS</code> keyword a solution?</p>
  
  <p>Edit: I can't activate the tablefunc extension because I don't manage the server myself so the solution explain <a href="https://stackoverflow.com/a/11751905/3468262">here</a> can't be easily used.</p>